You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2022/12/28 07:41:40 UTC

[GitHub] [doris] englefly commented on a diff in pull request #15437: [enhancement](session var) varariable to control whether to rewrite OR to IN or not

englefly commented on code in PR #15437:
URL: https://github.com/apache/doris/pull/15437#discussion_r1058125511


##########
fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java:
##########
@@ -2238,5 +2238,14 @@ public void testRewriteOrToIn() throws Exception {
         sql = "SELECT * from test1 where (query_time = 1 or query_time = 2) and (scan_bytes = 2 or scan_bytes = 3)";
         explainString = UtFrameUtils.getSQLPlanOrErrorMsg(connectContext, "EXPLAIN " + sql);
         Assert.assertTrue(explainString.contains("PREDICATES: `query_time` IN (1, 2), `scan_bytes` IN (2, 3)"));
+
+        connectContext.getSessionVariable().setRewriteOrToInPredicateThreshold(100);
+        sql = "SELECT * from test1 where query_time = 1 or query_time = 2 or query_time in (3, 4)";

Review Comment:
   REWRITE_OR_TO_IN_PREDICATE_THRESHOLD  包含 in的数量吗?



-- 
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: commits-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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