Xiaoqing Gao has posted comments on this change. ( http://gerrit.cloudera.org:8080/18729 )
Change subject: IMPALA-4052: CREATE TABLE LIKE for Kudu tables ...................................................................... Patch Set 29: (1 comment) Hi Quanlong, Sorry for taking so long. I also think that splitting the patch is an efficient way. I changed this patch focus on only cloning the schema. In https://issues.apache.org/jira/browse/IMPALA-11912, it focus on cloning range partitions. http://gerrit.cloudera.org:8080/#/c/18729/29/fe/src/main/java/org/apache/impala/catalog/FeKuduTable.java File fe/src/main/java/org/apache/impala/catalog/FeKuduTable.java: http://gerrit.cloudera.org:8080/#/c/18729/29/fe/src/main/java/org/apache/impala/catalog/FeKuduTable.java@151 PS29, Line 151: for (RangeWithHashSchema rangeWithHashSchema : > Hi Xiaoqing, Thanks for your very detailed description and advice. It seems that the following interfaces can be used to implement function. The definition of RangeWithHashSchema object returned by PartitionSchema.getRangesWithHashSchemas() is public static class RangeWithHashSchema { public PartialRow lowerBound; public PartialRow upperBound; public List<HashBucketSchema> hashSchemas; } The following interface gets the decoded start range key and end range key of each range partition. PartialRow rangeKeyStart = partition.getDecodedRangeKeyStart(kuduTable); PartialRow rangeKeyEnd = partition.getDecodedRangeKeyEnd(kuduTable); https://github.com/apache/kudu/blob/master/java/kudu-client/src/main/java/org/apache/kudu/client/Partition.java#L104 https://github.com/apache/kudu/blob/master/java/kudu-client/src/main/java/org/apache/kudu/client/Partition.java#L126 Looks like I need to use the following interface to compare the PartialRow objects(rangeKeyStart/rangeKeyEnd in each range partition and lowerBound/upperBound in each returned by PartitionSchema.getRangesWithHashSchemas()). https://github.com/apache/kudu/blob/master/java/kudu-client/src/main/java/org/apache/kudu/client/PartialRow.java#L1715 It will be subimited in the follow-on patch, tracked by https://issues.apache.org/jira/browse/IMPALA-11912 -- To view, visit http://gerrit.cloudera.org:8080/18729 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ia3d276a6465301dbcfed17bb713aca06367d9a42 Gerrit-Change-Number: 18729 Gerrit-PatchSet: 29 Gerrit-Owner: Xiaoqing Gao <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Kurt Deschler <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Wenzhe Zhou <[email protected]> Gerrit-Reviewer: Xiaoqing Gao <[email protected]> Gerrit-Comment-Date: Mon, 13 Feb 2023 09:23:11 +0000 Gerrit-HasComments: Yes
