Skip to content

Read as raster types only the structs whose reader answers a SQL type - #99

Merged
estebanzimanyi merged 1 commit into
masterfrom
fix/codegen-raster-types-skip-record-structs
Nov 21, 2026
Merged

estebanzimanyi merged 1 commit into
masterfrom
fix/codegen-raster-types-skip-record-structs

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

The generator reads the raster types from the structs of the raster
family, each struct naming the function that reads its text form, whose
SQL signature answers the type. MobilityDB's catalog gives BandStats a
text form, read by bandstats_in, which carries no SQL signature:
BandStats is the summarystats record PostGIS defines, which a function
answers and no column holds. Such a struct is no raster type and is
passed over; a struct whose reader the catalog does not declare at all
still stops the generator.

Witness: run on the catalog of MobilityDB master 8bd3b60c28, the
generator writes 2 raster types, raster and raquet, the set MobilityDB's
tools/raster_matrix.py names, and catalog_gen.go and mathops_meos_gen.go
are byte-identical to the committed ones.

Measured: on MobilityAPI master f7de535, CI stops at the generator with
"the struct BandStats reads its text form with bandstats_in, which
states no SQL signature answering a type", against the catalog of
MobilityDB master that carries the BandStats text form.

The generator reads the raster types from the structs of the raster
family, each struct naming the function that reads its text form, whose
SQL signature answers the type. MobilityDB's catalog gives BandStats a
text form, read by bandstats_in, which carries no SQL signature:
BandStats is the summarystats record PostGIS defines, which a function
answers and no column holds. Such a struct is no raster type and is
passed over; a struct whose reader the catalog does not declare at all
still stops the generator.

Witness: run on the catalog of MobilityDB master 8bd3b60c28, the
generator writes 2 raster types, raster and raquet, the set MobilityDB's
tools/raster_matrix.py names, and catalog_gen.go and mathops_meos_gen.go
are byte-identical to the committed ones.

Measured: on MobilityAPI master f7de535, CI stops at the generator with
"the struct BandStats reads its text form with bandstats_in, which
states no SQL signature answering a type", against the catalog of
MobilityDB master that carries the BandStats text form.
@estebanzimanyi
estebanzimanyi merged commit 97bdc1d into master Nov 21, 2026
2 checks passed
@estebanzimanyi
estebanzimanyi deleted the fix/codegen-raster-types-skip-record-structs branch November 21, 2026 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant