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

Dynamically typed ProjectedRasterTile expressions don't deserialize to Tile #295

Closed
metasim opened this issue Aug 19, 2019 · 1 comment · Fixed by #298
Closed

Dynamically typed ProjectedRasterTile expressions don't deserialize to Tile #295

metasim opened this issue Aug 19, 2019 · 1 comment · Fixed by #298
Assignees
Labels
bug When it really isn't a "feature".

Comments

@metasim
Copy link
Member

metasim commented Aug 19, 2019

If minus and one are ProjectedRasterTiles, the following code will throw a runtime cast exception.

val df = Seq((minus, one)).toDF("minus", "one")
assertEqual(df.select(rf_abs($"minus")).first(), one)

error:

cannot resolve 'CAST(`rf_abs(minus)` AS STRUCT<`cell_context`: STRUCT<`cellType`: STRUCT<`cellTypeName`: STRING>, `dimensions`: STRUCT<`cols`: SMALLINT, `rows`: SMALLINT>>, `cell_data`: STRUCT<`cells`: BINARY, `ref`: STRUCT<`source`: STRUCT<`raster_source_kryo`: BINARY>, `bandIndex`: INT, `subextent`: STRUCT<`xmin`: DOUBLE, `ymin`: DOUBLE, `xmax`: DOUBLE, `ymax`: DOUBLE>>>>)' due to data type mismatch: cannot cast struct<tile_context:struct<extent:struct<xmin:double,ymin:double,xmax:double,ymax:double>,crs:struct<crsProj4:string>>,tile:tile> to tile;
@metasim metasim added the bug When it really isn't a "feature". label Aug 19, 2019
@metasim metasim self-assigned this Aug 19, 2019
@metasim
Copy link
Member Author

metasim commented Aug 19, 2019

Taking the path of making overloaded tile methods return an untyped column since specific type. guarantee can't be made.

metasim added a commit to s22s/rasterframes that referenced this issue Aug 19, 2019
but claimed all return values were `Tile`. This was problematic whenever
the `Tile` as reified, and the serialization of `ProjectedRasterTile` confused
the `Tile` deserializer.

Fixes locationtech#295
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug When it really isn't a "feature".
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant