Skip to content

Geometry should be a first-class data type #19449

Open
@vcschapp

Description

@vcschapp

What?

Please expand the Presto SQL language Data Types to include a native geometry type.

Why?

Background

Some of Presto's supported engines do, or could, support geometry as a first-class type, for e.g. Amazon Redshift (data types). PostgreSQL would if PostGIS is installed. (See issue #15326 - Add WKB Support for PostGIS Geometry Columns). It appears BigQuery has something equivalent, also MySQL (data types); SQL Server (data types) and likely other underlying engines.

As well, even if they do not support geometry types today, some other systems like Iceberg and Hive likely will support it in the future as the GeoParquet format gains in popularity. (OK, hopefully gains in popularity!)

Use Cases Enabled

  1. As a Presto user, I want to be able to query the underlying engine's native geometry column without having to wrap the column in a spatio-temporal (ST_*) function to convert it to geometry.
  2. As a Presto user making queries to a data lake based on Hive, Iceberg, or similar, I want the query optimizer to be able to use geospatial metadata in columnar object files (like GeoParquet files) to intelligently skip objects that don't have any rows which match my spatial query.

Related

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    🆕 Unprioritized

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions