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 2022/06/09 01:51:28 UTC
[GitHub] [calcite] chunweilei commented on a diff in pull request #2811: [CALCITE-5156] Support implicit type cast for IN Sub-query
chunweilei commented on code in PR #2811:
URL: https://github.com/apache/calcite/pull/2811#discussion_r893001179
##########
core/src/test/resources/sql/sub-query.iq:
##########
@@ -1174,7 +1173,7 @@ EnumerableCalc(expr#0..3=[{inputs}], expr#4=[IS NULL($t3)], expr#5=[null:BOOLEAN
EnumerableLimit(fetch=[1])
EnumerableSort(sort0=[$0], dir0=[DESC])
EnumerableAggregate(group=[{0}], c=[COUNT()])
- EnumerableCalc(expr#0..2=[{inputs}], expr#3=[true], cs=[$t3])
+ EnumerableCalc(expr#0..2=[{inputs}], expr#3=[CAST($t0):INTEGER], expr#4=[IS NOT NULL($t3)], cs=[$t4])
EnumerableTableScan(table=[[scott, DEPT]])
!plan
Review Comment:
Are these plan changes desirable?
##########
core/src/test/java/org/apache/calcite/test/SqlToRelConverterTest.java:
##########
@@ -1704,6 +1704,23 @@ void checkCorrelatedMapSubQuery(boolean expand) {
sql(sql).withExpand(false).ok();
}
+ /** Test case for
+ * <a href="https://issues.apache.org/jira/browse/CALCITE-5156">[CALCITE-5156]
+ * Support implicit type cast for IN Sub-query</a>. */
+ @Test void testInSubQueryWithTypeCast() {
Review Comment:
> Maybe the UnitTest can be written in TypeCoercionConverterTest
+1.
--
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