yihua commented on code in PR #11579:
URL: https://github.com/apache/hudi/pull/11579#discussion_r1737376626
##########
hudi-common/src/main/java/org/apache/hudi/metadata/MetadataPartitionType.java:
##########
@@ -389,6 +385,9 @@ public static MetadataPartitionType[] getValidValues() {
* Returns the list of metadata partition types enabled based on the
metadata config and table config.
*/
public static List<MetadataPartitionType>
getEnabledPartitions(TypedProperties writeConfig, HoodieTableMetaClient
metaClient) {
+ if (!writeConfig.getBoolean(ENABLE.key(), ENABLE.defaultValue())) {
Review Comment:
Use `ConfigUtils.getBooleanWithAltKeys`
##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -1298,7 +1300,8 @@ private static Option<Schema>
tryResolveSchemaForTable(HoodieTableMetaClient dat
TableSchemaResolver schemaResolver = new
TableSchemaResolver(dataTableMetaClient);
return Option.of(schemaResolver.getTableAvroSchema());
} catch (Exception e) {
- throw new HoodieException("Failed to get latest columns for " +
dataTableMetaClient.getBasePath(), e);
+ LOG.warn("Failed to get latest columns for {}",
dataTableMetaClient.getBasePath());
+ return Option.empty();
Review Comment:
Should this still throw the exception? If there are completed commits, the
table schema is present; any unexpected error should fail the job instead of
returning an empty schema and empty list of columns, potentially causing the
index to skip those columns unintentionally.
--
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]