danny0405 commented on code in PR #7056:
URL: https://github.com/apache/hudi/pull/7056#discussion_r1006366625
##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/table/catalog/HiveSchemaUtils.java:
##########
@@ -177,10 +180,19 @@ private static DataType
toFlinkPrimitiveType(PrimitiveTypeInfo hiveType) {
/**
* Create Hive field schemas from Flink table schema including the hoodie
metadata fields.
+ *
+ * @param table
*/
- public static List<FieldSchema> toHiveFieldSchema(TableSchema schema) {
+ public static List<FieldSchema> toHiveFieldSchema(CatalogBaseTable table) {
+ TableSchema schema = table.getSchema();
+ Configuration configuration = Configuration.fromMap(table.getOptions());
+ Boolean changelogEnable =
configuration.getBoolean(FlinkOptions.CHANGELOG_ENABLED);
+ Collection<String> hoodieMetaColumns = HoodieRecord.HOODIE_META_COLUMNS;
+ if (changelogEnable) {
+ hoodieMetaColumns = HoodieRecord.HOODIE_META_COLUMNS_WITH_OPERATION;
Review Comment:
Can you past the error stack trace here ? The writer does not expect to sync
the `_hoodie_operation` meta field now.
--
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]