Skip to content

Conversation

@kasiafi
Copy link
Member

@kasiafi kasiafi commented Feb 7, 2023

The keyword COPARTITION is specific to table function invocation. It is not a reserved keyword. In some cases, the word COPARTITION can be ambiguously interpreted: either as table argument alias, or as part of the COPARTITION clause.
To solve the ambiguity, we decided to fail queries using the word "copartition" as table argument alias, while keeping the word non-reserved and available to be used as identifier in other contexts.

No docs or release notes required, because table function table arguments are not yet supported.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be allowed in this case since it's not ambiguous. We should only declare ambiguity when the AS keyword is missing. The error should message indicate that the ambiguity can be resolved by adding such keyword.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@martint done. Please take a look.

The keyword COPARTITION is specific to table function invocation.
It is not a reserved keyword. In some cases, the word COPARTITION
can be ambiguously interpreted: either as table argument alias,
or as part of the COPARTITION clause.
To solve the ambiguity, we decided to fail queries using the word
"copartition" as table argument alias, not preceded by the keyword "as",
while keeping the word non-reserved and available to be used as identifier
in other contexts.
@kasiafi kasiafi force-pushed the 454CopartitionAmbiguity branch from 835c914 to c6a1a76 Compare February 8, 2023 11:28
@kasiafi kasiafi requested a review from martint February 8, 2023 21:14
@kasiafi kasiafi merged commit 6d1edbf into trinodb:master Feb 9, 2023
@github-actions github-actions bot added this to the 407 milestone Feb 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants