Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Record if authorization identifier is delimited or not #313

Open
kokosing opened this issue Feb 25, 2019 · 1 comment
Open

Record if authorization identifier is delimited or not #313

kokosing opened this issue Feb 25, 2019 · 1 comment
Assignees

Comments

@kokosing
Copy link
Member

This issue comes from discussion: #289 (comment)

Per the standard, an authorization identifier is just a regular identifier, so the common rules for matching identifiers apply.

<authorization identifier> ::=
    <role name>
  | <user identifier>

<role name> ::=
  <identifier>

<user identifier> ::=
  <identifier>

Given two identifiers, A and B, the rules are, basically:

  • If A and B are delimited, they are equivalent if they are equal
  • If A is delimited and B is not, they are equivalent if A is equal to the capitalized form of B. Viceversa if B is delimited and A is not.
  • If A and B are both not delimited, they are equivalent if their capitalized forms are equal.

So, this class needs to record whether the name was originally in SQL as a delimited identifier or not.

This class refers to PrestoPrincipal.

@martint
Copy link
Member

martint commented Mar 4, 2019

Related to #17

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants