Alexey Serbin 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)

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, Alexey
Hi Xiaoqing,

I apologize for the late response -- I somehow missed this update.

It seems the current API isn't a straight fit for your purpose here.  Yes, 
PartitionSchema.getRangesWithHashSchemas() returns only ranges with _custom_ 
hash schemas, it doesn't return ranges with the table-wide schema.  That's so 
by design because the original PartitionSchema concept had no knowledge on the 
ranges in the table.  So, it is static in that regard and doesn't contain 
information on all range partitions in the table, while information on ranges 
with custom hash schemas is some sort of exception for particular ranges with 
overrides for the table-wide hash schema (it's supposed there is not so many 
overrides in a table).

Having the list of range partitions in a Kudu table without information on hash 
schemas, it's still possible to find hash schema information for every existing 
range.  If the range isn't in the list returned by 
PartitionSchema.getRangesWithHashSchemas(), then it has the table-wide hash 
schema.  The table-wide hash schema is what 
PartitionSchema.getHashBucketSchemas() returns.

Having this information, do you think you can make this work for the purpose of 
the createTableRangePartition() method begin added in this patch or you'd 
rather have PartitionSchema.getHashSchemaForRange() available in the impala 
package?

Thanks!


P.S. The interface you referred isn't public since it was not needed for 
IMPALA-11430 or anything else yet (see 
https://github.com/apache/impala/commit/7764830216d2d2d9a85ec7a6a7deb4badecb13a8),
 and it was enough to add KuduTable.getFormattedRangePartitionsWithHashSchema() 
method similar to KuduTable.getFormattedRangePartitions().



--
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: Fri, 13 Jan 2023 00:42:54 +0000
Gerrit-HasComments: Yes

Reply via email to