kangkaisen commented on a change in pull request #2821: The new materialized 
view selector
URL: https://github.com/apache/incubator-doris/pull/2821#discussion_r375258433
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/planner/OlapScanNode.java
 ##########
 @@ -130,6 +138,90 @@ public void setForceOpenPreAgg(boolean forceOpenPreAgg) {
         this.forceOpenPreAgg = forceOpenPreAgg;
     }
 
+    public Collection<Long> getSelectedPartitionIds() {
+        return selectedPartitionIds;
+    }
+
+    /**
+     * This method is mainly used to update scan range info in OlapScanNode by 
the new materialized selector.
+     * Situation1:
+     * If the new scan range is same as the old scan range which determined by 
the old materialized selector,
+     * the scan range will not be changed.
+     * <p>
+     * Situation2: Scan range is difference. The type of table is duplicated.
+     * The new scan range is used directly.
+     * The reason is that the old selector does not support SPJ<->SPJG, so the 
result of old one must be incorrect.
+     * <p>
+     * Situation3: Scan range is difference. The type of table is aggregated.
+     * The new scan range is different from the old one.
+     * If the test_materialized_view is set to true, an error will be reported.
+     * The query will be cancelled.
+     * <p>
+     * Situation4: Scan range is difference. The type of table is aggregated. 
`test_materialized_view` is set to false.
+     * If the enable_new_mv_selector is set to false, the result of the old 
version selector will be selected.
+     * If it is set to false, the result of the new version selector will be 
selected.
 
 Review comment:
   ```suggestion
        * If it is set to true, the result of the new version selector will be 
selected.
   ```

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to