Elephantusparvus opened a new pull request, #662:
URL: https://github.com/apache/incubator-sedona/pull/662

   
   ## Did you read the Contributor Guide?
   
   - Yes, I have read [Contributor 
Rules](https://sedona.apache.org/community/rule/) and [Contributor Development 
Guide](https://sedona.apache.org/community/develop/)
   
   - Yes.
   
   ## Is this PR related to a JIRA ticket?
   
   - Yes, the URL of the assoicated JIRA ticket is 
https://issues.apache.org/jira/browse/SEDONA-142. The PR name follows the 
format `[SEDONA-142] Add ST_Collect to Flink Catalog`.
   
   ## What changes were proposed in this PR?
   This is the first attempt to add ST_Collect aggregation to the flink api.
   
   ## How was this patch tested?
   In progress
   
   ## Did this PR include necessary documentation updates?
   Currently not.
   
   In advance this pull request is mainly done to discuss if this is a feasible 
approach to implement ST_Collect.
   The PR would have to be cleaned up (split up), tests would need to be added 
and it would need to be documented.
   
   I basically took the Internal Collect Aggregator from flink-table and 
adjusted it's types, letting it return a GeometryCollection.
   The getTypeInference needs to be overriden otherwise reflection fails for 
the mapview / selecting the right serializer fails.
   One Problem is/was that this function is not instantiated from a 
BuiltInFunctionDefinition/, 
   so it is not possible to implement it as BuiltInAggregateFunction and let it 
pass a SpecializedFunction.SpecializedContext to its constructor. And flinks 
collect function is constructed through its AggFunctionFactory which also 
passes the argType.
   So I needed to pass the Datatype for the geometry manually when constructing 
and adding it to the catalog, therefore needing a util function in the 
registrator.
   
   If needed I add separate prs to ST_MakeValid which is an almost 1-t 
port/copy from the spark version, and the ST_Intersection, ST_Difference which 
just wrap the jts locationtech functions.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to