danny0405 commented on code in PR #12977:
URL: https://github.com/apache/hudi/pull/12977#discussion_r1996483658


##########
hudi-common/src/main/java/org/apache/hudi/metadata/HoodieTableMetadataUtil.java:
##########
@@ -1597,10 +1597,9 @@ private static Map<String, Schema> 
getColumnsToIndexWithoutRequiredMetaFields(Ho
       tableSchemaLazyOpt.get().map(schema -> getFirstNSupportedFields(schema, 
metadataConfig.maxColumnsToIndexForColStats(), 
recordType)).orElse(Stream.empty())
           .forEach(entry -> colsToIndexSchemaMap.put(entry.getKey(), 
entry.getValue()));
       return colsToIndexSchemaMap;
-    } else if (isTableInitializing) {
-      return Collections.emptyMap();
     } else {
-      throw new HoodieMetadataException("Cannot initialize col stats with 
empty list of cols");
+      // initialize col stats index config with empty list of cols
+      return Collections.emptyMap();

Review Comment:
   I don't know how to add it bcause the input write schema is empty too, not a 
real production use case.



-- 
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]

Reply via email to