[
https://issues.apache.org/jira/browse/CALCITE-7056?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17978607#comment-17978607
]
xiong duan commented on CALCITE-7056:
-------------------------------------
Please verify your idea based on the test cases.
The situations I can currently think of mainly include:
{code:java}
1)Sub-query: select * from public.salgrade where grade >some (select grade from
public.salgrade);
2)ArrayValueConstructor: 1.0 = some (ARRAY[2,3,null])
3)Column Reference: WITH tb as (select array(SELECT * FROM (VALUES ('1970-01-01
01:23:45'), ('1970-01-01 01:23:46')) as x(a)) as a) SELECT timestamp
'1970-01-01 01:23:45' >= some (a) FROM t
4)Values: SELECT 1.0 = SOME (VALUES (1.0), (2.0));{code}
Perhaps some of the test cases have already been covered.
> Convert RelNode to Sql failed when the RelNode includes quantify operators
> --------------------------------------------------------------------------
>
> Key: CALCITE-7056
> URL: https://issues.apache.org/jira/browse/CALCITE-7056
> Project: Calcite
> Issue Type: Bug
> Reporter: xiong duan
> Priority: Major
>
> {code:java}
> @Test void testQuantifyOperatorsWithTypeCoercion() {
> final String query = "SELECT '1970-01-01 01:23:45' = any (array[timestamp
> '1970-01-01 01:23:45',"
> + "timestamp '1970-01-01 01:23:46'])";
> final String expected = "SELECT '1970-01-01 01:23:45' = any
> (array[timestamp '1970-01-01 01:23:45',"
> + "timestamp '1970-01-01 01:23:46'])";
> sql(query)
> .withCalcite().ok(expected);
> } {code}
> It throws an exception :
> {code:java}
> class org.apache.calcite.rex.RexCall cannot be cast to class
> org.apache.calcite.rex.RexSubQuery (org.apache.calcite.rex.RexCall and
> org.apache.calcite.rex.RexSubQuery are in unnamed module of loader
> 'app'){code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)