danny0405 commented on code in PR #18877:
URL: https://github.com/apache/hudi/pull/18877#discussion_r3385538796
##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/io/storage/row/RowDataParquetWriteSupport.java:
##########
@@ -39,15 +39,17 @@
public class RowDataParquetWriteSupport extends WriteSupport<RowData> {
private final RowType rowType;
+ protected final HoodieSchema hoodieSchema;
private final MessageType schema;
private ParquetRowDataWriter writer;
protected final Configuration hadoopConf;
public RowDataParquetWriteSupport(HoodieSchema hoodieSchema, Configuration
config) {
super();
- this.rowType = HoodieSchemaConverter.convertToRowType(hoodieSchema);
+ this.hoodieSchema = hoodieSchema;
+ this.rowType = (RowType)
HoodieSchemaConverter.convertToDataType(hoodieSchema).getLogicalType();
this.hadoopConf = new Configuration(config);
- this.schema =
ParquetSchemaConverter.convertToParquetMessageType("flink_schema", rowType);
+ this.schema =
ParquetSchemaConverter.convertToParquetMessageType("flink_schema", rowType,
hoodieSchema);
Review Comment:
the row type comes from the hoodieSchema, then why we need to pass both of
them?
--
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]