[SEDONA-703] Add utils for converting between RDD[Row] and SpatialRdd#1774
[SEDONA-703] Add utils for converting between RDD[Row] and SpatialRdd#1774james-willis wants to merge 1 commit intoapache:masterfrom
Conversation
|
@Kontinuation @jiayuasu is this logic duplicated anywhere else? Maybe somewhere in the Join logic? |
|
@james-willis This is where Sedona join does the conversion: DF to SpatialRDD: RDD to DF: Please consider reusing the logic if possible, |
Thanks Jia. I was thinking that these functions I created would be useful for Physical Nodes but the linked code reminds me that InternalRows/UnsafeRows are used in these Physical Nodes, whereas the functions in this PR are for Rows. While you can convert between Rows and InternalRows, its an unnecessary conversion. It is probably best to keep distinct implementations for these two interfaces. The fact that the implementations here are only useful for RDD[Row] but not RDD[InternalRow] makes me wonder if these are useful enough to introduce into the Sedona API. |
|
Close in favor of #1780 |
Did you read the Contributor Guide?
Is this PR related to a JIRA ticket?
[SEDONA-XXX] my subject.What changes were proposed in this PR?
Added utils for converting between RDD[Row] and SpatialRDD. These are helpful for usecases that back physical nodes or functions that take in and return RDDs.
How was this patch tested?
Unit Tests
Did this PR include necessary documentation updates?
vX.Y.Zformat.Docstrings are available.