dongkelun commented on a change in pull request #5051:
URL: https://github.com/apache/hudi/pull/5051#discussion_r835074474



##########
File path: 
hudi-hadoop-mr/src/main/java/org/apache/hudi/hadoop/utils/HoodieHiveUtils.java
##########
@@ -71,7 +71,7 @@
   public static final String DEFAULT_SCAN_MODE = SNAPSHOT_SCAN_MODE;
   public static final int DEFAULT_MAX_COMMITS = 1;
   public static final int MAX_COMMIT_ALL = -1;
-  public static final int DEFAULT_LEVELS_TO_BASEPATH = 3;
+  public static final int DEFAULT_LEVELS_TO_BASEPATH = 0;

Review comment:
       Hello, I know this is only a default value. There is only one place to 
use it globally, which is the 
`HoodieInputFormatUtils.getTableMetaClientForBasePathUnchecked` method. Its 
logic is to use `HoodiePartitionMetadata.getPartitionDepth` get the actual 
levels, but an empty table without data will not  create 
`.hoodie_partition_metadata` file,so  It can't get levels, then an exception 
will be thrown. I think  either change the default value or create 
`.hoodie_partition_metadata`  file when creating an empty table , and 
`.hoodie_partition_metadata`  cannot be deleted when `truncate table`.
   I'm not sure if there's any better way. What do you think?
   




-- 
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: commits-unsubscr...@hudi.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to