Skip to content

Build against MobilityDB master, without GEOS - #71

Merged
estebanzimanyi merged 1 commit into
masterfrom
gen/regenerate-from-master
Nov 5, 2026
Merged

estebanzimanyi merged 1 commit into
masterfrom
gen/regenerate-from-master

Conversation

@estebanzimanyi

@estebanzimanyi estebanzimanyi commented Nov 5, 2026 •

Copy link
Copy Markdown
Member

catalog_gen.go and mathops_meos_gen.go are what tools/codegen writes from the MEOS-API catalog of MobilityDB master. In that catalog the temporal S2 cell carries the MF-JSON token MovingS2Cell, and tnumber_angular_difference carries no SQL name: the only SQL angularDifference functions take a temporal point or two floats, so no SQL function answers it for a temporal number. The math operations are therefore 21, of which 18 are callable from the cgo dispatch, and angularDifference is not among them. The test that holds the segment-walking operations out of the lifted set names the two the catalog states, derivative and trend, and the comment in stream.go and GENERATION.md says the same.

The MEOS output functions of MobilityDB master write the size of their result, terminating null included, through a size_t pointer they require. The cgo stream engine passes one to tfloat_out and text_out and reads each result by that size, and a lifted operation whose result tfloat_out cannot write answers an error instead of reading a null string.

MobilityDB master builds without GEOS: its CMake looks for no GEOS, the vendored PostGIS reads the geometry types from a stand-in geos_c.h under meos/include/geos-none, and MEOS creates no GEOS context. The CI installs no GEOS development package and no GDAL from apt, whose GDAL links GEOS: the test job takes GDAL and libmeos from MEOS-API's provision-meos action, which builds GDAL from its release source with GEOS off, builds libmeos with every family from the MobilityDB commit the job checks out, installs both under /usr/local, and fails if a GEOS library loads with libmeos. The action runs before the job installs PostgreSQL 18, so the PostgreSQL it installs for its own build goes with the job's removal step, and the extension compiles against the same GDAL. PostGIS, which the extension requires, keeps its own GEOS. The comment on the thread-local caches of the stream engine names PROJ and the random number generators as the ones MEOS creates per thread.

Witness. go vet, go build and go test, with and without the meos tag, pass against a libmeos built from MobilityDB 91c37c37cd, and the generator rewrites both tables unchanged from the catalog of that commit.

@estebanzimanyi
estebanzimanyi force-pushed the gen/regenerate-from-master branch from 48b9e65 to e292c06 Compare November 5, 2026 19:01
@estebanzimanyi estebanzimanyi changed the title Regenerate the tables from the catalog of MobilityDB master Build against MobilityDB master: regenerate the tables and pass the output size Nov 5, 2026
catalog_gen.go and mathops_meos_gen.go are what tools/codegen writes from the MEOS-API catalog of MobilityDB master. In that catalog the temporal S2 cell carries the MF-JSON token MovingS2Cell, and tnumber_angular_difference carries no SQL name: the only SQL angularDifference functions take a temporal point or two floats, so no SQL function answers it for a temporal number. The math operations are therefore 21, of which 18 are callable from the cgo dispatch, and angularDifference is not among them. The test that holds the segment-walking operations out of the lifted set names the two the catalog states, derivative and trend, and the comment in stream.go and GENERATION.md says the same.

The MEOS output functions of MobilityDB master write the size of their result, terminating null included, through a size_t pointer they require. The cgo stream engine passes one to tfloat_out and text_out and reads each result by that size, and a lifted operation whose result tfloat_out cannot write answers an error instead of reading a null string.

MobilityDB master builds without GEOS: its CMake looks for no GEOS, the vendored PostGIS reads the geometry types from a stand-in geos_c.h under meos/include/geos-none, and MEOS creates no GEOS context. The CI installs no GEOS development package and no GDAL from apt, whose GDAL links GEOS: the test job takes GDAL and libmeos from MEOS-API's provision-meos action, which builds GDAL from its release source with GEOS off, builds libmeos with every family from the MobilityDB commit the job checks out, installs both under /usr/local, and fails if a GEOS library loads with libmeos. The action runs before the job installs PostgreSQL 18, so the PostgreSQL it installs for its own build goes with the job's removal step, and the extension compiles against the same GDAL. PostGIS, which the extension requires, keeps its own GEOS. The comment on the thread-local caches of the stream engine names PROJ and the random number generators as the ones MEOS creates per thread.

Witness. go vet, go build and go test, with and without the meos tag, pass against a libmeos built from MobilityDB 91c37c37cd, and the generator rewrites both tables unchanged from the catalog of that commit.
@estebanzimanyi
estebanzimanyi force-pushed the gen/regenerate-from-master branch from e292c06 to c04447c Compare November 5, 2026 19:24
@estebanzimanyi estebanzimanyi changed the title Build against MobilityDB master: regenerate the tables and pass the output size Build against MobilityDB master, without GEOS Nov 5, 2026
@estebanzimanyi
estebanzimanyi merged commit fc57fb3 into master Nov 5, 2026
3 of 4 checks passed
@estebanzimanyi
estebanzimanyi deleted the gen/regenerate-from-master branch November 5, 2026 21:03
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