Repository navigation
Pass a bound NULL to a parameter of any reference type on the typed SQL surfaces - #165
Merged
estebanzimanyi merged 1 commit intoOct 9, 2026
Conversation
…QL surfaces A parameter the catalog binds to NULL receives the Java literal null whatever its reference type, a jnr.ffi.Pointer or a java.lang.String alike, and is refused only for the eight primitive types, which hold no null. _bound_literal decides it for both typed SQL surfaces. Witness: over MobilityDB master a0480a7d38 and MEOS-API master f8f63bd the catalog binds srs of temporal_as_mfjson to NULL, as the PostgreSQL wrapper derives it from the value and MEOS names the reference system from spatial_ref_sys.csv when it is NULL; the jar types the parameter, a const char *, as java.lang.String, and main renders NULL only for jnr.ffi.Pointer, so both engines refuse the 20 asMFJSON signatures as bound:NULL/java.lang.String and register no asMFJSON. Measured over the same pair with the jar built from that catalog and that libmeos: no signature is refused for a bound NULL where main refuses 20, and the 121 refused for their argument count are unchanged; spark-sql and flink-sql each register 1155 SQL functions and 8829 overloads where main registers 1154 and 8754, the generated trees differing from main's only by AsMFJSON.java and its registration. The spark engine generates the same tree as main, and mvn clean install runs 106 codegen and 1800 jmeos-core tests green with no warning. Why: asMFJSON on Spark and Flink names the reference system as MEOS does for every binding, from its own reference systems.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A parameter the catalog binds to NULL receives the Java literal null whatever its reference type,
a jnr.ffi.Pointer or a java.lang.String alike, and is refused only for the eight primitive types,
which hold no null. _bound_literal decides it for both typed SQL surfaces.
Witness: over MobilityDB master a0480a7d38 and MEOS-API master f8f63bd the catalog binds srs of
temporal_as_mfjson to NULL, as the PostgreSQL wrapper derives it from the value and MEOS names the
reference system from spatial_ref_sys.csv when it is NULL; the jar types the parameter, a
const char *, as java.lang.String, and main renders NULL only for jnr.ffi.Pointer, so both
engines refuse the 20 asMFJSON signatures as bound:NULL/java.lang.String and register no asMFJSON.
Measured over the same pair with the jar built from that catalog and that libmeos: no signature
is refused for a bound NULL where main refuses 20, and the 121 refused for their argument count
are unchanged; spark-sql and flink-sql each register 1155 SQL functions and 8829 overloads where
main registers 1154 and 8754, the generated trees differing from main's only by AsMFJSON.java and
its registration. The spark engine generates the same tree as main, and mvn clean install runs
106 codegen and 1800 jmeos-core tests green with no warning.
Why: asMFJSON on Spark and Flink names the reference system as MEOS does for every binding, from
its own reference systems.