You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by GitBox <gi...@apache.org> on 2023/01/15 09:57:06 UTC

[GitHub] [calcite] dssysolyatin commented on a diff in pull request #2974: [CALCITE-5209] Proper sub-query handling if it is used inside select list and group by

dssysolyatin commented on code in PR #2974:
URL: https://github.com/apache/calcite/pull/2974#discussion_r1070548010


##########
core/src/test/resources/sql/agg.iq:
##########
@@ -3467,4 +3467,38 @@ order by ename, deptno;
 
 !ok
 
+# Test cases for [CALCITE-5209] ArrayIndexOutOfBoundsException during SqlToRelConverter for group-by on `case`
+# having `in` expression predicates exceeding SqlRelConverter.Config InSubQueryThreshold
+!use scott
+select
+    case when deptno in (1, 2, 3, 4, 5) THEN 1 else 0 end
+from emp
+group by
+    case when deptno in (1, 2, 3, 4, 5) THEN 1 else 0 end;
+
++--------+
+| EXPR$0 |
++--------+
+|      0 |
++--------+
+(1 row)
+
+!ok
+
+!set insubquerythreshold 5
+select
+    case when deptno in (1, 2, 3, 4, 5) THEN 1 else 0 end

Review Comment:
   @libenchao Done. I also rebased branch.



-- 
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@calcite.apache.org

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