danny0405 commented on code in PR #18361:
URL: https://github.com/apache/hudi/pull/18361#discussion_r2985289160


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/source/reader/function/HoodieCdcSplitReaderFunction.java:
##########
@@ -530,10 +531,8 @@ private static class DataLogFileIterator implements 
ClosableIterator<RowData> {
       this.tableSchema = tableSchema;
       this.maxCompactionMemoryInBytes = maxCompactionMemoryInBytes;
       this.imageManager = imageManager;
-      this.projection = 
requiredRowType.equals(tableSchema.getAvroSchema().getFields().size() == 
requiredRowType.getFieldCount()
-          ? requiredRowType : null)
-          ? null
-          : RowDataProjection.instance(requiredRowType, requiredPositions);
+      this.projection = 
HoodieSchemaConverter.convertToRowType(tableSchema).equals(requiredRowType)

Review Comment:
   can we introudce `MergeOnReadTableState` juse like before, the conversion is 
risky for minor discrepancies like column nullability.



-- 
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