You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am develping a c++ parser and evaluator for CQL2. https://github.com/IndoorSpatial/cql2cpp
When I handling the IsInListPredicate, I go through the document and have two questions:
I Want to confirm that: Question 1: Can I (and should I) do some type cast in my libray to handle this and return TRUE?
3.2 IN (3.2) // TRUE
3.2 IN ('3.2') // TRUE
3.2 IN ('+3.2') // TRUE
Question 2: What should I do if the value of left part is NULL?
for example
name IN ('Alice', 'Bob') // the "name" is not a queryable in the data source.
unknow_func('A', TRUE) IN ('Alice', 'Bob', unknow_func('B', FALSE)) // Null IN ('Alice', 'Bob', Null)
The text was updated successfully, but these errors were encountered:
Yes, the three IN expressions are all invalid as their semantics is undefined, but the permission allows that implementations can cast values so that all values are compatible with each other.
Whether your implementation rejects the last two expressions in Question 1 or not and the strings are cast to a number or the number is cast to a string is your decision.
With respect to NULL (Question 2) the usual rules apply. If the left-hand side is NULL, the IN predicate evaluates to NULL.
By the way, if "name" is not a queryable the result could also be an error as "name" is not a valid property reference.
I am develping a c++ parser and evaluator for CQL2. https://github.com/IndoorSpatial/cql2cpp
When I handling the IsInListPredicate, I go through the document and have two questions:
According to Requirement 7.B
https://github.com/opengeospatial/ogcapi-features/blob/master/cql2/standard/requirements/advanced-comparison-operators/REQ_in-predicate.adoc
My understanding is, all queries below are invalid
But according to Permission 2.A
https://github.com/opengeospatial/ogcapi-features/blob/master/cql2/standard/recommendations/basic-cql2/PER_type-casts.adoc
"the server MAY either return an error or it MAY cast the operands to compatible data types"
I Want to confirm that:
Question 1: Can I (and should I) do some type cast in my libray to handle this and return TRUE?
Question 2: What should I do if the value of left part is NULL?
for example
The text was updated successfully, but these errors were encountered: