You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Rui Wang (Jira)" <ji...@apache.org> on 2020/02/12 21:39:00 UTC

[jira] [Updated] (CALCITE-3788) SqlValidatorImpl.registerOperandSubQueries should skip creating SCALAR_QUERY call when operand is a SqlSelect and the SqlSelect does not return a scalar value

     [ https://issues.apache.org/jira/browse/CALCITE-3788?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rui Wang updated CALCITE-3788:
------------------------------
    Summary: SqlValidatorImpl.registerOperandSubQueries should skip creating SCALAR_QUERY call when operand is a SqlSelect and the SqlSelect does not return a scalar value  (was: SqlValidatorImpl.registerOperandSubQueries should skip creating SCALAR_QUERY call when operand is a SqlSelect and the SqlSelect does not returns a scalar value)

> SqlValidatorImpl.registerOperandSubQueries should skip creating SCALAR_QUERY call when operand is a SqlSelect and the SqlSelect does not return a scalar value
> --------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CALCITE-3788
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3788
>             Project: Calcite
>          Issue Type: Sub-task
>            Reporter: Rui Wang
>            Priority: Major
>
> For a table function which uses named argument for a TABLE parameter:
> Select * From
> TABLE(TUMBLE(
>            data =>  TABLE orders
>            ...
> )
> The TABLE parameter will be wrapped by a SCALAR_QUERY call at this line: https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/validate/SqlValidatorImpl.java#L3067
> However, it is wrong because TABLE paramter is not a query that returns a scalar value.
> It cannot be solved by overriding SqlOperator.argumentMustBeScalar because named argument is a special operator that doesn't tied with other operators.
> One possible resolution is also check if operand is SqlSelect at  SqlValidatorImpl.java#L3067.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)