-
Notifications
You must be signed in to change notification settings - Fork 54
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
Fix CASE example #901
Fix CASE example #901
Conversation
modules/ROOT/pages/queries/case.adoc
Outdated
@@ -107,9 +107,9 @@ The supported comparators are: | |||
|
|||
* xref::syntax/operators.adoc#query-operators-comparison[Regular Comparison Operators]: `+=+`, `+<>+`, `+<+`, `+>+`, `+<=+`, `+>=+` | |||
* xref:values-and-types/working-with-null.adoc#is-null-is-not-null[`IS NULL` Operator]: `IS [NOT] NULL` | |||
* xref:values-and-types/type-predicate.adoc[Type Predicate Expression]: `IS [NOT] :: <TYPE>` | |||
* xref:values-and-types/type-predicate.adoc[Type Predicate Expression]: `IS [NOT] TYPED <TYPE>` (Note: the form `IS [NOT] :: <TYPE>` is not currently accepted as it leads to an ambiguous grammar) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* xref:values-and-types/type-predicate.adoc[Type Predicate Expression]: `IS [NOT] TYPED <TYPE>` (Note: the form `IS [NOT] :: <TYPE>` is not currently accepted as it leads to an ambiguous grammar) | |
* xref:values-and-types/type-predicate.adoc[Type Predicate Expression]: `IS [NOT] TYPED <TYPE>` (Note that the form `IS [NOT] :: <TYPE>` is currently not accepted as it leads to ambiguous grammar) |
what is the ambiguity? would it make sense to add an example?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think an example might be more confusing to users, it was a very niche edge case:
WITH "this is a string" AS IS
RETURN CASE 1
WHEN IS :: INT THEN "1 is an int"
ELSE "the IS is actually a variable so this is returned"
END
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to give a reason here, and we also try to avoid words like "currently". In other words, can't we just say "Note that the form... is not accepted", and then change it in the future, if and when it becomes necessary?
Thanks for the documentation updates. The preview documentation has now been torn down - reopening this PR will republish it. |
There was an ambiguous case we had to remove in CASE expressions.