[
https://issues.apache.org/jira/browse/CALCITE-4758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17424890#comment-17424890
]
duan xiong commented on CALCITE-4758:
-------------------------------------
[~julianhyde] I find In some.iq from
[code-subQuery|https://github.com/apache/calcite/blob/master/core/src/test/resources/sql/some.iq#L515]
to
[code-subQuery|https://github.com/apache/calcite/blob/master/core/src/test/resources/sql/some.iq#L561]
This SQL is valid in Calcite. This issue is:
When sub-query is a value list and the list size is greater than the subquery
threshold, then it can't be converted by the convertInToOr method, finally
return the wrong answer.
The unit test in some.iq can succeed because this can be converted by the
convertInToOr method.
> When SOME sub-query is SqlNodeList, Calcite returns wrong result
> -----------------------------------------------------------------
>
> Key: CALCITE-4758
> URL: https://issues.apache.org/jira/browse/CALCITE-4758
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.27.0
> Reporter: duan xiong
> Assignee: duan xiong
> Priority: Major
> Labels: pull-request-available
> Time Spent: 10m
> Remaining Estimate: 0h
>
> As discussed in the comments: The SQL
> {code:java}
> select * from "scott".emp where sal > some (4000, 2000)
> {code}
> is illegal SQL. So we should throw an exception instead of return a wrong
> result.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)