Skip to content

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

Closed

Description

@metasim

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;

Activity

  1. added
    bugWhen it really isn't a "feature".
    on Aug 19, 2019
  2. self-assigned this
    on Aug 19, 2019
  3. metasim commented on Aug 19, 2019

    @metasim
    MemberAuthor

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

  4. added a commit that references this issue on Aug 19, 2019
    68a8e86
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugWhen it really isn't a "feature".

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions