davidradl commented on code in PR #28594:
URL: https://github.com/apache/flink/pull/28594#discussion_r3518952501


##########
flink-formats/flink-csv/src/main/java/org/apache/flink/formats/csv/CsvFileFormatFactory.java:
##########
@@ -130,7 +134,11 @@ public BulkFormat<RowData, FileSourceSplit> 
createRuntimeDecoder(
             final RowType projectedRowType = (RowType) 
projectedDataType.getLogicalType();
 
             final RowType physicalRowType = (RowType) 
physicalDataType.getLogicalType();
-            final CsvSchema schema = buildCsvSchema(physicalRowType, 
formatOptions);
+            CsvSchema builtSchema = buildCsvSchema(physicalRowType, 
formatOptions);
+            if (formatOptions.get(IGNORE_FIRST_LINE)) {
+                builtSchema = 
builtSchema.rebuild().setSkipFirstDataRow(true).build();

Review Comment:
   is there a reason why we need to rebuild ; can we not build it properly with 
this option and avoid the rebuild?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to