amanomer commented on issue #26293: [SPARK-29595][SQL] Insertion with named_struct should match by name URL: https://github.com/apache/spark/pull/26293#issuecomment-549372314 Hive, `1) create table str as(select named_struct('a', 1, 'b', 2) as data);` `2) insert into str values (named_struct('b', 3, 'a', 1));` Output `Error: Error while compiling statement: FAILED: SemanticException [Error 10044]: Line 1:12 Cannot insert into target table because column number/types are different 'str': Cannot convert column 0 from struct<b:int,a:int> to struct<a:int,b:int>. (state=42000,code=10044)`
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
