Abhishek Chennaka has posted comments on this change. ( http://gerrit.cloudera.org:8080/20219 )
Change subject: KUDU-1945 Update Default Range partition Key ...................................................................... Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/20219/1//COMMIT_MSG Commit Message: http://gerrit.cloudera.org:8080/#/c/20219/1//COMMIT_MSG@9 PS1, Line 9: primary keys > columns of the primary key? Done http://gerrit.cloudera.org:8080/#/c/20219/1/src/kudu/common/partition-test.cc File src/kudu/common/partition-test.cc: http://gerrit.cloudera.org:8080/#/c/20219/1/src/kudu/common/partition-test.cc@2316 PS1, Line 2316: TEST_F(PartitionTest, PartitionKeyWithAutoIncrementingColumn) { > It would be great to provide a small blurb describing what is the essence o Yes, it would fail as we would end up creating the below partition schema: HASH (c1) PARTITIONS 2, RANGE (c1,auto_incrementing_id). I'll add a comment above. http://gerrit.cloudera.org:8080/#/c/20219/1/src/kudu/common/partition.cc File src/kudu/common/partition.cc: http://gerrit.cloudera.org:8080/#/c/20219/1/src/kudu/common/partition.cc@277 PS1, Line 277: if (schema.auto_incrementing_col_idx() != column_idx) { > BTW, have you checked out other places in the code where RangeSchema::colum Yes, I manually looked through all the occurrences of RangeSchema range_schema_ member variable in partition.cc to understand if this change breaks anything and found nothing including PartitionSchema::PartitionMayContainRow. To give more context, this happens when there is no range partition schema set. Looks like it was assumed to use all of the PK to create a range partition seemed like a reasonable approach previously. But that doesn't work with auto-incrementing columns as they are not meant to be partition keys. And there is no assumption that range partition key should have all the primary key columns present as it is a user defined field. I also found that if there is no range schema present during a table DDL, impala seems to be setting it to null explicitly and we would not have this behavior over there. -- To view, visit http://gerrit.cloudera.org:8080/20219 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I89818ceb261064369a63712f6c093f41e57ca5cc Gerrit-Change-Number: 20219 Gerrit-PatchSet: 1 Gerrit-Owner: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Abhishek Chennaka <[email protected]> Gerrit-Reviewer: Alexey Serbin <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mahesh Reddy <[email protected]> Gerrit-Comment-Date: Wed, 19 Jul 2023 01:40:00 +0000 Gerrit-HasComments: Yes
