You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Niels Pardon (Jira)" <ji...@apache.org> on 2024/09/11 06:17:00 UTC

[jira] [Commented] (CALCITE-6576) SqlParser does not support using UPDATE table alias with column identifiers in SET

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

Niels Pardon commented on CALCITE-6576:
---------------------------------------

I do have a fix and will provide a PR.

> SqlParser does not support using UPDATE table alias with column identifiers in SET
> ----------------------------------------------------------------------------------
>
>                 Key: CALCITE-6576
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6576
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.37.0
>            Reporter: Niels Pardon
>            Assignee: Niels Pardon
>            Priority: Minor
>
> The Apache Calcite SQL parser does allow to assign a table alias within an UPDATE statement but the table alias can currently not be used with the column identifiers within the SET section.
> The following can be parsed successfully:
> {code:sql}
> UPDATE mytable AS t SET ID=1;
> UPDATE mytable t SET ID=1;
> {code}
> But the parser fails as soon as the table alias is used with the column identifier in the SET section:
> {code:sql}
> UPDATE mytable AS t SET t.ID=1;
> UPDATE mytable t SET t.ID=1;
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)