[jira] [Created] (FLINK-14784) CsvTableSink miss delimiter when row start with null member

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-14784) CsvTableSink miss delimiter when row start with null member

Shang Yuanchun (Jira)
Leonard Xu created FLINK-14784:
----------------------------------

             Summary: CsvTableSink miss delimiter when row start with null member
                 Key: FLINK-14784
                 URL: https://issues.apache.org/jira/browse/FLINK-14784
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / API
    Affects Versions: 1.9.1
            Reporter: Leonard Xu
             Fix For: 1.10.0


{code:java}
//
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();
}{code}
when row start with null member,  result string  will miss delimiter.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)