xicm commented on PR #6899: URL: https://github.com/apache/hudi/pull/6899#issuecomment-1272804571
> @xicm You might add META_SYNC_PARTITION_FIELDS as the 3rd config to infer after the table config and keygen option, to keep the inference consistent. But what are the cases that the hudi table does not have the partition table configs, and you can't specify the keygen options like for the writer configs ? in another word, why would `META_SYNC_PARTITION_FIELDS` be different from the table configs or keygen options (writer configs) ? we should strive to make these consistent. that's why we introduce the inference and try to avoid the needs of manual overwrite. I find the problem when I run hive sync with `./run_sync_tool.sh --sync-mode hms --user hive --partitioned-by partitionpath --base-path /tmp/hoodie/xicm_test --database default --table xicm_test`. I get an Exception `org.apache.hadoop.hive.metastore.api.MetaException: Invalid partition key & values; keys [partitionpath, ], values [2020, 01, 01, ]`. The partition field is "2020/01/01". Add parameter `--partition-value-extractor SinglePartPartitionValueExtractor`, the sync is successful. Then I add some logs to see why the inference doesn't work, I find HoodieTableConfig.PARTITION_FIELDS and KeyGeneratorOptions.PARTITIONPATH_FIELD_NAME are null. And we pass --partition-value-extractor to META_SYNC_PARTITION_FIELDS, META_SYNC_PARTITION_EXTRACTOR_CLASS can't be inferred. -- 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]
