haridsv commented on code in PR #1969:
URL: https://github.com/apache/phoenix/pull/1969#discussion_r1770766770
##########
phoenix-core-client/src/main/java/org/apache/phoenix/index/IndexMaintainer.java:
##########
@@ -470,6 +471,7 @@ private IndexMaintainer(final PTable dataTable, final
PTable cdcTable, final PTa
this.immutableStorageScheme = index.getImmutableStorageScheme() ==
null ? ImmutableStorageScheme.ONE_CELL_PER_COLUMN :
index.getImmutableStorageScheme();
this.dataEncodingScheme = dataTable.getEncodingScheme() == null ?
QualifierEncodingScheme.NON_ENCODED_QUALIFIERS : dataTable.getEncodingScheme();
this.dataImmutableStorageScheme =
dataTable.getImmutableStorageScheme() == null ?
ImmutableStorageScheme.ONE_CELL_PER_COLUMN :
dataTable.getImmutableStorageScheme();
+ this.nDataTableSaltBuckets = isDataTableSalted ?
dataTable.getBucketNum() : PTable.NO_SALTING;
Review Comment:
In the existing code, `PTableImpl.toProto()` translates `0` into `-1` and
`PTableImpl.createFromProto()` leaves this value as `null` by checking for
`-1`. To be consistent, I think we should change `nIndexSaltBuckets` to also
`-1` instead of the other way around. I did a quick check, I think the existing
code will work as is, as it checks for `> 0`. WDYT?
--
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]