Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IDEA PLACEHOLDER] Add support for Calcite Spatial #1210

Open
wants to merge 3 commits into
base: branch-21.06
Choose a base branch
from

Conversation

Christian8491
Copy link
Contributor

@Christian8491 Christian8491 commented Nov 25, 2020

This PR enables support on Calcite spatial functions

For now we don't have support (at engine level) for these spatial operators, but some of them work, like:

"SELECT col_a from geometry_table where ST_Distance(ST_MakePoint(125.2, 22.5), ST_MakePoint(2.0, 12.3)) > 100.2"
"SELECT ST_X(ST_MakePoint(125.22, 22.5)) from geometry_table"
"SELECT ST_Distance(ST_MakePoint(125.22, 22.5), ST_MakePoint(2.0, 12.3)) AS DISTANCE from geometry_table"
"SELECT ST_AsText(ST_MakePoint(125.22, 22.5)) from geometry_table"
"SELECT ST_AsWKT(ST_MakePoint(125.22, 22.5)) from geometry_table"
"SELECT ST_GeometryType(ST_MakePoint(125.22, 22.5)) from geometry_table"
"SELECT ST_GeometryType(ST_PointFromText('POINT (125 22)')) from geometry_table"
"SELECT ST_GeometryType(ST_LineFromText('LINESTRING (125 22, 100 50, 80 52)')) from geometry_table"
"SELECT ST_GeometryType(ST_PolyFromText('POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10))')) from geometry_table"
"SELECT ST_GeometryType(ST_MakeLine(ST_MakePoint(125.22, 22.5), ST_MakePoint(15.72, 21.5))) from geometry_table"

I think some of the more useful operator that we want to enable primarily are:

ST_PointFromText()
ST_MakePoint()
ST_Distance()
ST_PointFromText()
ST_AsText()

we want to consider a new Geom dtype in order to support these spatial operators.

@mike-wendt
Copy link

rerun tests

@wmalpica wmalpica closed this Dec 7, 2020
@wmalpica wmalpica deleted the branch BlazingDB:branch-21.06 December 7, 2020 23:39
@wmalpica wmalpica reopened this Dec 7, 2020
@wmalpica wmalpica changed the base branch from branch-0.17 to branch-0.18 December 7, 2020 23:46
@wmalpica
Copy link
Contributor

This looks great, but as @Christian8491 mentiones, we will need new data types internally to really roll this out. So this PR is for now, just a placeholder for future work

@wmalpica wmalpica changed the title [WIP] Add support for Calcite Spatial [IDEA PLACEHOLDER] Add support for Calcite Spatial Dec 11, 2020
@wmalpica wmalpica changed the base branch from branch-0.18 to branch-0.19 February 24, 2021 23:17
@wmalpica wmalpica changed the base branch from branch-0.19 to branch-0.20 April 12, 2021 18:43
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.

3 participants