[SEDONA-406] Add a dummy implementation of UDT RasterType to get rid of errors when representing pyspark dataframes containing raster fields. #1043
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Did you read the Contributor Guide?
Is this PR related to a JIRA ticket?
What changes were proposed in this PR?
RasterUDT
does not have a corresponding PySpark implementation, which will lead to errors when printing pyspark dataframes. For example, if we rundf
to print the pyspark dataframe in jupyter notebook, it will raise an exception:This is because RasterUDT does not have a PySpark implementation. This patch adds a dummy PySpark implementation for RasterUDT to suppress this error.
It is hard to implement a functioning RasterType in python because some components of the rasters were serialized using Java serializer. We'll switch to customized kryo serializer for easier implementation of RasterType.
How was this patch tested?
After applying this patch, evaluating
df
in jupyter notebook yields this output:We've also added a unit test for it.
Did this PR include necessary documentation updates?