1032851561 commented on code in PR #8098: URL: https://github.com/apache/hudi/pull/8098#discussion_r1129296740
########## hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/HoodieTableFactory.java: ########## @@ -75,7 +76,7 @@ public DynamicTableSource createDynamicTableSource(Context context) { Path path = new Path(conf.getOptional(FlinkOptions.PATH).orElseThrow(() -> new ValidationException("Option [path] should not be empty."))); setupTableOptions(conf.getString(FlinkOptions.PATH), conf); - ResolvedSchema schema = context.getCatalogTable().getResolvedSchema(); + ResolvedSchema schema = ResolvedSchema.of(context.getCatalogTable().getResolvedSchema().getColumns().stream().filter(c-> !(c instanceof Column.ComputedColumn)).collect(Collectors.toList())); setupConfOptions(conf, context.getObjectIdentifier(), context.getCatalogTable(), schema); Review Comment: `org.apache.flink.table.catalog.ResolvedSchema#toSinkRowDataType` will filter ComputedColumn whitch is not persisted, so computed column never write into hudi. ``` public DataType toSinkRowDataType() { final DataTypes.Field[] fields = columns.stream() .filter(Column::isPersisted) .map(ResolvedSchema::columnToField) .toArray(DataTypes.Field[]::new); return ROW(fields).notNull(); } ``` -- 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: commits-unsubscr...@hudi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org