You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/11/06 18:02:00 UTC

[jira] [Commented] (CALCITE-2542) SqlNode AtomicRowExpression + DOT operation does not work for constructed ROWs

    [ https://issues.apache.org/jira/browse/CALCITE-2542?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16677091#comment-16677091 ] 

Julian Hyde commented on CALCITE-2542:
--------------------------------------

I hope we agree that "SELECT emp.*.xx FROM myTable" is invalid and should remain so.

Yes, it's similar to CALCITE-2016, but you need to go further, and make '.' an infix operator. On the left side of the '.' we should allow any expression. (The parser should accept anything, except "*" or ".*", and the validator can fail if the left-hand side is not a record type.) On the right side of the '.' we need to allow "identifier" or "function(arg,...)".


> SqlNode AtomicRowExpression + DOT operation does not work for constructed ROWs
> ------------------------------------------------------------------------------
>
>                 Key: CALCITE-2542
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2542
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>            Reporter: Rong Rong
>            Assignee: Julian Hyde
>            Priority: Major
>
> It seems like some of the {{AtomicRowExpression}} (such as {{NamedFunctionCall}}) or rowSpan with {{<ROW>}} operator does not allow following DOT operators in Parser.jj
> To named a few, the following does not parse correctly.
> {code}
> SELECT ROW(col1, col2, col3).col1 FROM t
> SELECT myFunc(arg1, arg2).col1 FROM t
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)