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

PartiQL Identifier - Variable Binding and Variable Look Up. #83

Open
yliuuuu opened this issue Jun 27, 2024 · 0 comments
Open

PartiQL Identifier - Variable Binding and Variable Look Up. #83

yliuuuu opened this issue Jun 27, 2024 · 0 comments

Comments

@yliuuuu
Copy link
Contributor

yliuuuu commented Jun 27, 2024

Related Issues:

Variable Binding

For variable binding, case insensitivity identifier are not normalized, and the exact text was used to track identifier in environment as defined in PartiQL specification.

Variable Look up

The implementation of PartiQL-Lang-Kotlin uses a "match" strategy for variable look up.

match(id, env) = {
   env.get(DIB(id)) if id is a delimited identifier
   env.get(id, ignoreCase) if id is a regular identifier
} 

Note: env.get(id, ignoreCase) will attempts to compare each key with id 
regardless of the case. 

In other word: For each key: it compares upper(key) with upper(id)

This match strategy is not conformant to behavior defined in the SQL specification for case insensitive identifier.

We need to decided if we want to :

  1. Keep the current behavior, and specify and stabilize it.
  2. Switch to the behavior defined by SQL.
  3. Switch to case sensitive identifier, in which case the double quoted identifier is only for escaping special character and reserved word.

DoD:

  • A RFC on PartiQL Identifier is published, reviewed, and merged.
  • Implementation of PartiQL-Lang-Kotlin and PartiQL-Lang-Rust is changed according to the specification.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant