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

`rf_agg_local_mean` error with ProjectedRaster type #333

Closed
vpipkt opened this issue Sep 5, 2019 · 1 comment
Assignees
Labels
bug

Comments

@vpipkt
Copy link
Member

@vpipkt vpipkt commented Sep 5, 2019

Initially saw this in doing a df.groupby.agg(rf_agg_local_mean('proj_raster)) in Python. The use of rf_tile was the immediate work around.

I don't understand the cast error, but I suspect a red herring here.

I will file a PR with a (ignored) unit test.

java.lang.ClassCastException: java.lang.Double cannot be cast to org.apache.spark.unsafe.types.UTF8String
	at org.apache.spark.sql.catalyst.expressions.BaseGenericInternalRow$class.getUTF8String(rows.scala:46)
	at org.apache.spark.sql.catalyst.expressions.GenericInternalRow.getUTF8String(rows.scala:195)
@metasim

This comment has been minimized.

Copy link
Member

@metasim metasim commented Sep 6, 2019

@vpipkt

I don't understand the cast error, but I suspect a red herring here.

FWIW, the error is technically on point because what's going on is that the struct layout of proj_raster has a double in the first field, but TileUDT expects the first field to be a string... basically a clear sign I missed this use case.

metasim added a commit to s22s/rasterframes that referenced this issue Sep 6, 2019
metasim added a commit that referenced this issue Sep 6, 2019
Fix for #333 and additional tests in that vein.
@metasim metasim closed this Sep 6, 2019
metasim added a commit to s22s/rasterframes that referenced this issue Sep 13, 2019
* develop: (254 commits)
  Incorporated PR feedback.
  Make python RasterSourceTest.test_list_of_list_of_str clearer, more stable
  Propagate errors encountered in RasterSourceToRasterRefs. Closes locationtech#267.

  Updated release notes.
  Switched Explode tiles to use UnsafeRow for slight improvement on memory pressure. Reworked TileExplodeBench
  Changed CatalystSerialize implementations to store scheams as fields rather than methods.
  Benchmark and fix for CellType reification issue. Closes locationtech#343
  PR feedback edits.
  Fleshed out details on using Scala. Closes locationtech#324
  Fixes locationtech#338.
  Tweaked parquet I/O tests to trigger UDT issue.
  Normalize RasterSourceDataSource param names between python and SQL
  PR feedback
  Run python tile exploder test for projected raster
  Fix for locationtech#333 and additional tests in that vein.
  Add failing unit test for issue 333, error in rf_agg_local_mean
  Updated ExplodeTiles to work with proj_raster type.
  Ignoring RGB composite tests until next round of improvements.
  IT test build fix.
  Incremental work on refactoring aggregate raster creation.
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.