Repository navigation
Read RETURNS TABLE as the set of rows of its columns - #207
Merged
estebanzimanyi merged 1 commit intoOct 25, 2026
Merged
Conversation
sql_signature reads RETURNS TABLE (...) as PostgreSQL defines it, a set of rows whose columns are its OUT arguments: a set of record whose columns are the table's, or a set of the type of its one column. meta/sql-columns.json states the field of the returned structure feeding each column where a column's name or a field no column reads leaves it to the statement: the rows of pixelAsPoints read the geom, the value, the x and the y of each Pixel, and those of geoPoseFrames each field of a GeoPoseFrame by the column of its name. A row whose columns nothing feeds still stops the catalog, but for a signature passing a SQL array where the function takes one element of it (_loops_over_an_array): that signature is the wrapper's loop of calls, not a projection of the function, and attach_row_sources gives it up as attach_claims_fit gives up an unfit shared signature. dumpValues(raster, integer[], boolean) calls raster_dump_values once per band of its array, each row's nband a band of the argument, and the function keeps its one-band signature dumpValues(raster, integer, boolean). Measured over MobilityDB master 1a7a1a0e11: the catalog differs from master's in geopose_frames and raster_pixel_as_points, whose signatures state their rows, and in raster_dump_values, which keeps its one-band signature; _loops_over_an_array holds for that one signature of the catalog. Over that catalog the JVM generators of JMEOS main answer pixelAsPoints on the typed Spark and Flink surfaces, 1305 SQL functions and 9373 overloads where master's catalog gives 1304 and 9370, refuse geoPoseFrames as setret:column/return:text, and the Spark gaps ledger is unchanged; MobilityDuck main's generator writes the same files. tests/test_sqlfn_rows.py reads a RETURNS TABLE of several columns and of one, gives up the unfed row of a signature looping over an array, and stops on the unfed row of a signature that does not; the suite passes, 593 tests and none skipped.
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.
sql_signature reads RETURNS TABLE (...) as PostgreSQL defines it, a set of rows whose columns are its OUT arguments: a set of record whose columns are the table's, or a set of the type of its one column. meta/sql-columns.json states the field of the returned structure feeding each column where a column's name or a field no column reads leaves it to the statement: the rows of pixelAsPoints read the geom, the value, the x and the y of each Pixel, and those of geoPoseFrames each field of a GeoPoseFrame by the column of its name.
A row whose columns nothing feeds still stops the catalog, but for a signature passing a SQL array where the function takes one element of it (_loops_over_an_array): that signature is the wrapper's loop of calls, not a projection of the function, and attach_row_sources gives it up as attach_claims_fit gives up an unfit shared signature. dumpValues(raster, integer[], boolean) calls raster_dump_values once per band of its array, each row's nband a band of the argument, and the function keeps its one-band signature dumpValues(raster, integer, boolean).
Measured over MobilityDB master 1a7a1a0e11: the catalog differs from master's in geopose_frames and raster_pixel_as_points, whose signatures state their rows, and in raster_dump_values, which keeps its one-band signature; _loops_over_an_array holds for that one signature of the catalog. Over that catalog the JVM generators of JMEOS main answer pixelAsPoints on the typed Spark and Flink surfaces, 1305 SQL functions and 9373 overloads where master's catalog gives 1304 and 9370, refuse geoPoseFrames as setret:column/return:text, and the Spark gaps ledger is unchanged; MobilityDuck main's generator writes the same files. tests/test_sqlfn_rows.py reads a RETURNS TABLE of several columns and of one, gives up the unfed row of a signature looping over an array, and stops on the unfed row of a signature that does not; the suite passes, 593 tests and none skipped.