Open lxynov opened 5 years ago
Hive Connector supports schema evolution for a struct-typed column if the evolution is to add or drop fields from the end. https://github.com/prestosql/presto/blob/9ea6d0b7c685123c63403b5af4a952b4f5474695/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveCoercionPolicy.java#L116
Is it reasonable to do the coercion based on field names? So that the evolution can add fields in the middle of such a struct column.
cc: @wagnermarkd @Yaliang
@dain Could you take a look when you get time? The idea is to support column evolution from type struct<a:int, b:int> to struct<a:int, c:int, b:int>. I encountered a use case doing so.
struct<a:int, b:int>
struct<a:int, c:int, b:int>
Hive Connector supports schema evolution for a struct-typed column if the evolution is to add or drop fields from the end. https://github.com/prestosql/presto/blob/9ea6d0b7c685123c63403b5af4a952b4f5474695/presto-hive/src/main/java/io/prestosql/plugin/hive/HiveCoercionPolicy.java#L116
Is it reasonable to do the coercion based on field names? So that the evolution can add fields in the middle of such a struct column.
cc: @wagnermarkd @Yaliang