[ https://issues.apache.org/jira/browse/CARBONDATA-3643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Xingjun Hao updated CARBONDATA-3643: ------------------------------------ Description: sql("create table datatype_struct_parquet(price struct<b:array<string>>) stored as parquet") sql("insert into table datatype_struct_parquet values(named_struct('b', array('')))") sql("create table datatype_struct_carbondata(price struct<b:array<string>>) stored as carbondata") sql("insert into datatype_struct_carbondata select * from datatype_struct_parquet") {code:java} // sql("create table datatype_struct_parquet(price struct<b:array<string>>) stored as parquet") sql("insert into table datatype_struct_parquet values(named_struct('b', array('')))") sql("create table datatype_struct_carbondata(price struct<b:array<string>>) stored as carbondata") sql("insert into datatype_struct_carbondata select * from datatype_struct_parquet") checkAnswer( sql("SELECT * FROM datatype_struct_carbondata"), sql("SELECT * FROM datatype_struct_parquet")) !== Correct Answer - 1 == == Spark Answer - 1 == ![[WrappedArray()]] [[WrappedArray(null)]] {code} was: sql("create table datatype_struct_parquet(price struct<b:array<string>>) stored as parquet") sql("insert into table datatype_struct_parquet values(named_struct('b', array('')))") sql("create table datatype_struct_carbondata(price struct<b:array<string>>) stored as carbondata") sql("insert into datatype_struct_carbondata select * from datatype_struct_parquet") {code:java} // checkAnswer( sql("SELECT * FROM datatype_struct_carbondata"), sql("SELECT * FROM datatype_struct_parquet")) !== Correct Answer - 1 == == Spark Answer - 1 == ![[WrappedArray()]] [[WrappedArray(null)]] {code} > Insert array('')/array() into Struct<Array> column will result in array(null), which is inconsist with Parquet > -------------------------------------------------------------------------------------------------------------- > > Key: CARBONDATA-3643 > URL: https://issues.apache.org/jira/browse/CARBONDATA-3643 > Project: CarbonData > Issue Type: Bug > Affects Versions: 1.6.1, 2.0.0 > Reporter: Xingjun Hao > Priority: Minor > Fix For: 2.0.0 > > > sql("create table datatype_struct_parquet(price struct<b:array<string>>) stored as parquet") > sql("insert into table datatype_struct_parquet values(named_struct('b', array('')))") > sql("create table datatype_struct_carbondata(price struct<b:array<string>>) stored as carbondata") > sql("insert into datatype_struct_carbondata select * from datatype_struct_parquet") > > {code:java} > // > sql("create table datatype_struct_parquet(price struct<b:array<string>>) stored as parquet") > sql("insert into table datatype_struct_parquet values(named_struct('b', array('')))") > sql("create table datatype_struct_carbondata(price struct<b:array<string>>) stored as carbondata") sql("insert into datatype_struct_carbondata select * from datatype_struct_parquet") > checkAnswer( sql("SELECT * FROM datatype_struct_carbondata"), sql("SELECT * FROM datatype_struct_parquet")) > !== Correct Answer - 1 == == Spark Answer - 1 == > ![[WrappedArray()]] [[WrappedArray(null)]] > {code} > -- This message was sent by Atlassian Jira (v8.3.4#803005) |
Free forum by Nabble | Edit this page |