trushev commented on code in PR #5830:
URL: https://github.com/apache/hudi/pull/5830#discussion_r1002865594
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/format/cow/CopyOnWriteInputFormat.java:
##########
@@ -99,10 +113,36 @@ public CopyOnWriteInputFormat(
this.selectedFields = selectedFields;
this.conf = new SerializableConfiguration(conf);
this.utcTimestamp = utcTimestamp;
+ this.schemaEvolutionContext = SchemaEvolutionContext.of(flinkConf);
}
@Override
public void open(FileInputSplit fileSplit) throws IOException {
+ String[] actualFieldNames;
+ DataType[] actualFieldTypes;
+ if (schemaEvolutionContext.isPresent()) {
+ SchemaEvolutionContext context = schemaEvolutionContext.get();
+ InternalSchema actualSchema = context.getActualSchema(fileSplit);
Review Comment:
Moved this logic to separate method `setActualFields`
--
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]