You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by xi...@apache.org on 2023/03/25 04:57:09 UTC

[pinot] branch master updated: Remove "isSorted()" precondition check in the ForwardIndexHandler (#10476)

This is an automated email from the ASF dual-hosted git repository.

xiangfu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git


The following commit(s) were added to refs/heads/master by this push:
     new ea0ecde9ed Remove "isSorted()" precondition check in the ForwardIndexHandler (#10476)
ea0ecde9ed is described below

commit ea0ecde9edac5e0889f628446bdb23aa2bb605f9
Author: Seunghyun Lee <se...@startree.ai>
AuthorDate: Sat Mar 25 13:57:03 2023 +0900

    Remove "isSorted()" precondition check in the ForwardIndexHandler (#10476)
    
    * Remove "isSorted()" precondition check in the ForwardIndexHandler
    
    Current code has a precondition check for no-dictionary colums and
    we fail the load if the no-dictionary columns are sorted when
    the table config has changed from `no-dict` -> `dict`. This PR
    unblocks the failure issue.
    
    * addressing the comment
---
 .../pinot/segment/local/segment/index/loader/ForwardIndexHandler.java | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
index 9213f3aea7..7d8479bd50 100644
--- a/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
+++ b/pinot-segment-local/src/main/java/org/apache/pinot/segment/local/segment/index/loader/ForwardIndexHandler.java
@@ -301,10 +301,6 @@ public class ForwardIndexHandler extends BaseIndexHandler {
           continue;
         }
 
-        // Note that RAW columns cannot be sorted.
-        ColumnMetadata existingColMetadata = _segmentDirectory.getSegmentMetadata().getColumnMetadataFor(column);
-        Preconditions.checkState(!existingColMetadata.isSorted(), "Raw column=" + column + " cannot be sorted.");
-
         columnOperationsMap.put(column, Collections.singletonList(Operation.ENABLE_DICTIONARY));
       } else if (existingDictColumns.contains(column) && newNoDictColumns.contains(column)) {
         // Existing column has dictionary. New config for the column is RAW.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org