Repository navigation
Read a pointer field of the structures a set of rows returns as a value of its column - #194
Merged
estebanzimanyi merged 1 commit intoOct 25, 2026
Conversation
…ue of its column A column of a set-returning function reading a pointer field of the structures the function returns reads it through _setret_column of tools/codegen_jvm.py as a value of the column's SQL type, encoded by its value class from the pointer at the field's offset in the element of its row, NULL for a null pointer (MeosSqlRuntime.orNull). The function allocates each such value apart, and the eval frees the field of each element before the array (MeosSqlRuntime.freeField, written by _free_each beside the freeEach of an array of pointers): dumpAsPolygons(raster, integer, boolean) answers the geom and the val of each GeomVal and frees them as geomval_arr_free does. Witness: over MobilityDB master 1a7a1a0e11 and the catalog of MEOS-API #206, which states the columns of dumpAsPolygons from the fields of each GeomVal, main's generator refuses dumpAsPolygons on the typed Spark and Flink surfaces as setret:column/return:geometry. Measured with the jar of JMEOS main: over that catalog the Spark SQL and Flink SQL surfaces each answer 1304 SQL functions and 9370 overloads where main's answer 1303 and 9367, the 3 more the calls of dumpAsPolygons with and without its band and its exclusion of the nodata pixels; over MEOS-API master's catalog every generated file is identical but MeosSqlRuntime, which carries freeField and orNull. codegen/src/test/java/JvmStructFieldColumnTest.java runs the generator over a function whose rows read a GSERIALIZED pointer field and a double: on main it is refused as setret:column/return:geometry on both surfaces, and here each row reads the geometry through its value class and the eval frees the field of each element before the array.
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 column of a set-returning function reading a pointer field of the structures the function returns reads it through _setret_column of tools/codegen_jvm.py as a value of the column's SQL type, encoded by its value class from the pointer at the field's offset in the element of its row, NULL for a null pointer (MeosSqlRuntime.orNull). The function allocates each such value apart, and the eval frees the field of each element before the array (MeosSqlRuntime.freeField, written by _free_each beside the freeEach of an array of pointers): dumpAsPolygons(raster, integer, boolean) answers the geom and the val of each GeomVal and frees them as geomval_arr_free does.
Witness: over MobilityDB master 1a7a1a0e11 and the catalog of MEOS-API #206, which states the columns of dumpAsPolygons from the fields of each GeomVal, main's generator refuses dumpAsPolygons on the typed Spark and Flink surfaces as setret:column/return:geometry.
Measured with the jar of JMEOS main: over that catalog the Spark SQL and Flink SQL surfaces each answer 1304 SQL functions and 9370 overloads where main's answer 1303 and 9367, the 3 more the calls of dumpAsPolygons with and without its band and its exclusion of the nodata pixels; over MEOS-API master's catalog every generated file is identical but MeosSqlRuntime, which carries freeField and orNull. codegen/src/test/java/JvmStructFieldColumnTest.java runs the generator over a function whose rows read a GSERIALIZED pointer field and a double: on main it is refused as setret:column/return:geometry on both surfaces, and here each row reads the geometry through its value class and the eval frees the field of each element before the array.