ogcapi-features icon indicating copy to clipboard operation
ogcapi-features copied to clipboard

Related concerns around spec description of IS NULL and IS NOT NULL

Open philvarner opened this issue 3 years ago • 4 comments

I'm looking at: https://github.com/opengeospatial/ogcapi-features/blob/master/cql2/standard/clause_6_basic_cql2.adoc

Few related concerns:

  1. This doesn't mention "IS NOT NULL" as allowed as an operator, but used in an example for IS NULL.
  2. I assume "NOT IS NULL" would also work, but this isn't mentioned.
  3. There's no example using just "IS NULL"
  4. Is there a CQL JSON Operator "isNotNull" also?

philvarner avatar Oct 26 '21 16:10 philvarner

@philvarner Requirement 1 says that a basic CQL2 implementation must support the BNF production booleanValueExpression which includes the production comaprisonPredicate which includes the production isNullPredicate which includes both is null and is not null expressions.

booleanValueExpression = andExpression
                       | orExpression
                       | notExpression
                       | comparisonPredicate
                       | spatialPredicate
                       | temporalPredicate
                       | arrayPredicate
                       | subExpression;

comparisonPredicate = binaryComparisonPredicate
                    | isLikePredicate
                    | isBetweenPredicate
                    | isInListPredicate
                    | isNullPredicate;

isNullPredicate = scalarExpression "IS" ["NOT"] "NULL";

I'm guessing that is not sufficient explanation so I'll add a few more words into the text ... and examples.

pvretano avatar Oct 26 '21 16:10 pvretano

ah, great. What about

Is there a CQL JSON Operator "isNotNull" also?

?

philvarner avatar Oct 27 '21 13:10 philvarner

@philvarner, yes. There is a not operator and an isNull operator in JSON as well so you can combine them to get not null. Again, examples would help and I will add some.

pvretano avatar Oct 27 '21 13:10 pvretano

@philvarner

Regarding:

  1. I assume "NOT IS NULL" would also work, but this isn't mentioned.

My understanding is that this is not supported by cql2-text.

jerstlouis avatar Jun 28 '22 02:06 jerstlouis