jackjlli commented on code in PR #9333:
URL: https://github.com/apache/pinot/pull/9333#discussion_r972374277
##########
pinot-segment-local/src/main/java/org/apache/pinot/segment/local/realtime/converter/stats/MutableColumnStatistics.java:
##########
@@ -145,6 +146,8 @@ public boolean isSorted() {
// Iterate over all data to figure out whether or not it's in sorted order
MutableForwardIndex mutableForwardIndex = (MutableForwardIndex)
_dataSource.getForwardIndex();
+ Preconditions.checkState(mutableForwardIndex != null,
Review Comment:
I saw that in some places `UnsupportedOperationException` is thrown and in
others the precondition is used. Should we consider unifying them?
##########
pinot-tools/src/main/java/org/apache/pinot/tools/segment/converter/DictionaryToRawIndexConverter.java:
##########
@@ -296,6 +297,10 @@ private void convertOneColumn(IndexSegment segment, String
column, File newSegme
throws IOException {
DataSource dataSource = segment.getDataSource(column);
ForwardIndexReader reader = dataSource.getForwardIndex();
+ if (reader == null) {
Review Comment:
same here. Consider renaming it to `forwardIndexReader`.
##########
pinot-core/src/main/java/org/apache/pinot/core/minion/RawIndexConverter.java:
##########
@@ -204,6 +204,11 @@ private void convertColumn(FieldSpec fieldSpec)
// Create the raw index
DataSource dataSource =
_originalImmutableSegment.getDataSource(columnName);
ForwardIndexReader reader = dataSource.getForwardIndex();
+ if (reader == null) {
Review Comment:
nit: rename it to `forwardIndexReader`
--
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]