Jakarta Data aims to support both SQL and NoSQL datastores, but NOT NULL semantics are not portable across these models.
In SQL:
- Schema-defined columns always exist
- Missing values are represented as
NULL
IS NOT NULL has well-defined behavior
In NoSQL (especially Document/Graph):
- Attributes may be absent or explicitly set to null
- These are distinct states
- Query engines often distinguish between
exists, absent, and not null
Because of this, tests such as:
RestrictionTests.testNotNullRestrictionAllFound
RestrictionTests.testNotNullRestrictionSomeFound
implicitly assume SQL semantics that cannot be guaranteed across NoSQL providers.
Question:
How should the TCK define portability expectations for NOT NULL?
- Relational-only guarantee?
- Provider-defined semantics for NoSQL?
- Explicit distinction between
EXISTS and IS NOT NULL (even EXISTS making sense only to NoSQL?)
Jakarta Data aims to support both SQL and NoSQL datastores, but
NOT NULLsemantics are not portable across these models.In SQL:
NULLIS NOT NULLhas well-defined behaviorIn NoSQL (especially Document/Graph):
exists,absent, andnot nullBecause of this, tests such as:
RestrictionTests.testNotNullRestrictionAllFoundRestrictionTests.testNotNullRestrictionSomeFoundimplicitly assume SQL semantics that cannot be guaranteed across NoSQL providers.
Question:
How should the TCK define portability expectations for
NOT NULL?EXISTSandIS NOT NULL(evenEXISTSmaking sense only to NoSQL?)