Skip to content

GEOMESA-3584 Derive geometry type + name information from geomesa SFT spec metadata#3590

Open
cwdobbins wants to merge 2 commits into
locationtech:mainfrom
cwdobbins:feature/geometry-subtype-binding
Open

GEOMESA-3584 Derive geometry type + name information from geomesa SFT spec metadata#3590
cwdobbins wants to merge 2 commits into
locationtech:mainfrom
cwdobbins:feature/geometry-subtype-binding

Conversation

@cwdobbins

@cwdobbins cwdobbins commented Jul 19, 2026

Copy link
Copy Markdown
Contributor

GEOMESA-3584: Derive geometry tyes from their stored SFT metadata attibutes

Deferred from #3573.

Background

TrinoTypeMapper bound every geometry column to Point or generic GeometryPointwhen the column carried a __X_z2__ companion, Geometry otherwise. Consumers of the discovered GeoTools schema got no more than that, even though the table's geometry is often a precise subtype (LineString, Polygon, MultiPolygon, …).

Change

When an Iceberg table carries a GeoMesa-encoded SimpleFeatureType, schema discovery now parses it and binds each geometry attribute to the subtype it declares; it falls back to the previous naming heuristic when no SFT metadata is present.

  • TrinoSchemaDiscovery reads the geomesa.sft.spec (and geomesa.sft.name) table properties from the Iceberg "<table>$properties" metadata table. The spec is parsed with GeoMesa's SimpleFeatureTypes.createType, and each geometry attribute's JTS binding drives the descriptor.
  • TrinoTypeMapper.toDescriptor takes the resolved geometry binding Class.
  • failsafe: an absent property, an unreadable $properties, or an unparseable spec all fall back to the Point | Geometry heuristic.
  • Declared geomesa-utils explicitly in the datastore pom since SimpleFeatureTypes is now used directly.

Comment thread geomesa-trino/geomesa-trino-datastore/pom.xml Outdated
@cwdobbins
cwdobbins force-pushed the feature/geometry-subtype-binding branch from 47d3cc8 to 7d75363 Compare July 21, 2026 00:18
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.

2 participants