Jackie-Jiang commented on code in PR #8846:
URL: https://github.com/apache/pinot/pull/8846#discussion_r901025316
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/creator/impl/stats/LongColumnPreIndexStatsCollector.java:
##########
@@ -100,8 +97,11 @@ public int getCardinality() {
@Override
public void seal() {
- _sortedValues = _values.toLongArray();
- Arrays.sort(_sortedValues);
- _sealed = true;
+ if (!_sealed) {
Review Comment:
I don't want to introduce an extra per-value check (other checks are per
column). IMO it is okay for it to throw NPE if someone uses it incorrectly.
Added an assert
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]