[ 
https://issues.apache.org/jira/browse/HUDI-2101?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17386622#comment-17386622
 ] 

ASF GitHub Bot commented on HUDI-2101:
--------------------------------------

leesf commented on a change in pull request #3330:
URL: https://github.com/apache/hudi/pull/3330#discussion_r675935583



##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/AbstractHoodieWriteClient.java
##########
@@ -182,6 +183,13 @@ public boolean commitStats(String instantTime, 
List<HoodieWriteStat> stats, Opti
     try {
       preCommit(instantTime, metadata);
       commit(table, commitActionType, instantTime, metadata, stats);
+      if (extraMetadata.isPresent() && 
extraMetadata.get().containsKey("_hoodie.zorder.enable")) {

Review comment:
       can define constant in `HoodieClusteringConfig`?

##########
File path: 
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/AbstractHoodieWriteClient.java
##########
@@ -182,6 +183,13 @@ public boolean commitStats(String instantTime, 
List<HoodieWriteStat> stats, Opti
     try {
       preCommit(instantTime, metadata);
       commit(table, commitActionType, instantTime, metadata, stats);
+      if (extraMetadata.isPresent() && 
extraMetadata.get().containsKey("_hoodie.zorder.enable")) {
+        String basePath = table.getMetaClient().getBasePath();
+        String indexPath = table.getMetaClient().getZindexPath();
+        List<String> zFiles = stats.stream().map(s -> new Path(basePath, 
s.getPartitionPath()).toString()).collect(Collectors.toList());
+        saveStatisticsInfo(zFiles,
+            extraMetadata.get().getOrDefault("_hoodie.zorder.cols", ""), 
indexPath, "append");

Review comment:
       ditto




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


> support z-order for hudi
> ------------------------
>
>                 Key: HUDI-2101
>                 URL: https://issues.apache.org/jira/browse/HUDI-2101
>             Project: Apache Hudi
>          Issue Type: Sub-task
>          Components: Spark Integration
>            Reporter: tao meng
>            Assignee: tao meng
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 0.10.0
>
>
> support z-order for hudi to optimze the query



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to