-
Notifications
You must be signed in to change notification settings - Fork 1
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
EXCLUDE in the Presence of Schema #91
Comments
Based on initial discussion w/ the team on 9/11/24, we focused primarily on the first case -- Should we keep the existing behavior or give a warning or an error?Initially, I was inclined to make this case a compile-time error since the existing behavior of no errors would "silently" not exclude any values. However, the team had concerns over
A possible middle-ground for error vs no error is to be more flexible and leave it to implementations to give a warning or error for this case. Consider a phrasing like the following:
Should we tie invalid
|
Context
The current
EXCLUDE
RFC draft describesEXCLUDE
semantics during evaluation time without schema.EXCLUDE
’s behavior in the presence of schema is left in the “Unresolved questions” section — https://github.com/partiql/partiql-docs/blob/exclude-rfc/RFCs/0051-exclude-operator.adoc#unresolved-questions.The reference implementation, partiql-lang-kotlin, does not currently give an error if we EXCLUDE on a tuple attribute that does not exist during compilation and evaluation. Given a closed schema (i.e. no structs or binding tuples are open), it has been confusing in some cases when an
EXCLUDE
path does not actually exclude any attributes.^ currently no compile-time error
Cases to consider
Assuming closed schema, the following are some examples to correspond to each of the
EXCLUDE
RFCs unspecified cases w/ schema,1. EXCLUDE on a tuple attribute that does not exist
2. EXCLUDE tuple step on a collection or collection step on a tuple
E.g. w/ invalid collection wildcard step when flds just has structs
3. EXCLUDE on a collection index out of bounds
4. EXCLUDE collection index on a bag
5. EXCLUDE on a tuple attribute with duplicates
6. EXCLUDE with redundant steps
Expected outcomes
The text was updated successfully, but these errors were encountered: