Repository navigation
Read an unsigned count field in an integer column of a set of rows on the typed SQL surfaces - #193
Merged
estebanzimanyi merged 1 commit intoOct 25, 2026
Conversation
… the typed SQL surfaces A set-returning function whose rows read the fields of the structures it returns reads each field through SETRET_FIELD of tools/codegen_jvm.py, which reads an unsigned 32-bit count in an integer column as the 32-bit integer the wrapper returns: valueCount(raster, ...) answers the value and the count of each ValueCount, as Raster_value_count returns its count. An array of uint32_t elements is read as before, through SETRET_SCALAR, where geo_cluster_dbscan answers UINT32_MAX for a noise point that its wrapper turns into NULL. Witness: over MobilityDB master 1a7a1a0e11 and MEOS-API master 71c23da, main's generator refuses valueCount on the typed Spark and Flink surfaces as setret:column/return:integer, the count of ValueCount being a uint32_t. Measured over the same pair with the jar built from that catalog and that libmeos: the Spark SQL and Flink SQL surfaces each answer 1303 SQL functions and 9367 overloads where main's answer 1302 and 9365, the 2 more the calls of valueCount(raster, integer, boolean, float[], float) with and without its rounding, and every other generated file is identical. codegen/src/test/java/JvmStructFieldColumnTest.java runs the generator over a function whose rows read a double and a uint32_t field of the structures it returns: on main it is refused as setret:column/return:integer on both surfaces, and here each row reads both fields at their offsets.
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 set-returning function whose rows read the fields of the structures it returns reads each field through SETRET_FIELD of tools/codegen_jvm.py, which reads an unsigned 32-bit count in an integer column as the 32-bit integer the wrapper returns: valueCount(raster, ...) answers the value and the count of each ValueCount, as Raster_value_count returns its count. An array of uint32_t elements is read as before, through SETRET_SCALAR, where geo_cluster_dbscan answers UINT32_MAX for a noise point that its wrapper turns into NULL.
Witness: over MobilityDB master 1a7a1a0e11 and MEOS-API master 71c23da, main's generator refuses valueCount on the typed Spark and Flink surfaces as setret:column/return:integer, the count of ValueCount being a uint32_t.
Measured over the same pair with the jar built from that catalog and that libmeos: the Spark SQL and Flink SQL surfaces each answer 1303 SQL functions and 9367 overloads where main's answer 1302 and 9365, the 2 more the calls of valueCount(raster, integer, boolean, float[], float) with and without its rounding, and every other generated file is identical. codegen/src/test/java/JvmStructFieldColumnTest.java runs the generator over a function whose rows read a double and a uint32_t field of the structures it returns: on main it is refused as setret:column/return:integer on both surfaces, and here each row reads both fields at their offsets.