Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-14784

CsvTableSink miss delimiter when row start with null member

    XMLWordPrintableJSON

    Details

      Description

      //
      public String map(Row row) {
         StringBuilder builder = new StringBuilder();
         Object o;
         for (int i = 0; i < row.getArity(); i++) {
            if (builder.length() != 0) {
               builder.append(fieldDelim);
            }
            if ((o = row.getField(i)) != null) {
               builder.append(o);
            }
         }
         return builder.toString();
      }

      when row start with null member,  result string  will miss delimiter.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Leonard Xu Leonard Xu
                Reporter:
                Leonard Xu Leonard Xu
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 20m
                  20m