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

[SEDONA-170] Add ST_AddPoint and ST_RemovePoint to the Flink API #692

Merged
merged 1 commit into from
Sep 20, 2022

Conversation

sekikn
Copy link
Contributor

@sekikn sekikn commented Sep 19, 2022

Did you read the Contributor Guide?

Is this PR related to a JIRA ticket?

What changes were proposed in this PR?

  • This PR adds ST_AddPoint and ST_RemovePoint to the Flink API.

How was this patch tested?

  • Ran mvn clean install locally
  • Ran mkdocs serve and checked the generated API document

Did this PR include necessary documentation updates?

  • Yes, I am adding a new API. I am using the 1.3.0 in since vX.Y.Z format.

@bchapuis
Copy link
Member

bchapuis commented Sep 20, 2022

@sekikn In my understanding Apache Flink uses Apache Calcite under the hood. Is that right? Would it make sense to implement these spatial functions directly in Calcite? Here are some recent changes made to calcite relevant to this issue:

apache/calcite@2624925
apache/calcite@250d13c

@jiayuasu
Copy link
Member

This looks interesting. Does Flink already support ESRI geometry type before your PR? I checked their doc (https://nightlies.apache.org/flink/flink-docs-master/docs/dev/table/types/#data-types-in-the-table-api): Geometry is not listed as primitive type.

In addition, some functions such as spatial aggregation might be able to be ported from Calcite to Flink. Some functions such as ST_Subdivide are actually implemented by Sedona committers for Spark. We just simply port them to Flink.

@bchapuis
Copy link
Member

bchapuis commented Sep 22, 2022

I'm not using Flink and I don't know exactly how they use Calcite. Before my PR, calcite used the ESRI geometry API, it now uses JTS and proj4j. I now started working implicit conversion (text => geometry), aggregation function (Accum, Union, etc.), and try to figure out how to implement other special functions such as (ST_Explode). It would be great if we could share some code/implementation (e.g. ST_AddPoint and ST_RemovePoint are currently missing in calcite).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants