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

CsvTableSink miss delimiter when row start with null member

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    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

          Activity

            People

            • Assignee:
              Leonard Xu Leonard Xu
              Reporter:
              Leonard Xu Leonard Xu

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Issue deployment