> On Jan. 11, 2014, 8:05 a.m., Carl Steinbach wrote: > > serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java, > > line 146 > > <https://reviews.apache.org/r/11925/diff/6/?file=420187#file420187line146> > > > > wrapWithUnion is not used.
Used in updated code. > On Jan. 11, 2014, 8:05 a.m., Carl Steinbach wrote: > > serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java, > > line 163 > > <https://reviews.apache.org/r/11925/diff/6/?file=420187#file420187line163> > > > > wrapWithUnion is not used. Used in updated code. > On Jan. 11, 2014, 8:05 a.m., Carl Steinbach wrote: > > serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java, > > line 174 > > <https://reviews.apache.org/r/11925/diff/6/?file=420187#file420187line174> > > > > wrapWithUnion is not used. Used in updated code. > On Jan. 11, 2014, 8:05 a.m., Carl Steinbach wrote: > > ql/src/test/queries/clientpositive/avro_create_as_select.q, line 3 > > <https://reviews.apache.org/r/11925/diff/6/?file=420178#file420178line3> > > > > Please populate the source table with data before running a CTAS > > statement against it (the current example is functionally equivalent to > > CREATE TABLE LIKE -- does that work?). Better yet, please use the > > alltypesorc test table (which has columns for each type), as well as a > > query where only some columns are projected, and a query where nested > > fields are explicitly projected by name. I added a new table creation using all avro types. But load data into Avro table from non-Avro doesn't work (REF:HIVE-5803). > On Jan. 11, 2014, 8:05 a.m., Carl Steinbach wrote: > > ql/src/test/queries/clientpositive/avro_without_schema.q, line 1 > > <https://reviews.apache.org/r/11925/diff/6/?file=420181#file420181line1> > > > > Why have both avro_no_schema_test.q and avro_without_schema.q? Why does > > avro_without_schema.q create the table, but not load it with data or select > > from it? remove one and put into one file with proper comments. > On Jan. 11, 2014, 8:05 a.m., Carl Steinbach wrote: > > serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java, > > line 53 > > <https://reviews.apache.org/r/11925/diff/6/?file=420187#file420187line53> > > > > "Moreover, since any type could potentially hold a NULL value, all > > corresponding Avro schema should be a union of null and the type (UNION<T, > > NULL>). > > > > This statement is contradicted by the code which won't generate a > > record or array field with nullable elements. > > > > Can you please add a test to show what happens when a non-avro table > > with record and array columns containing NULL elements is streamed into an > > Avro table using CTAS? Added test case. - Mohammad ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/11925/#review31584 ----------------------------------------------------------- On Jan. 10, 2014, 7:58 p.m., Mohammad Islam wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/11925/ > ----------------------------------------------------------- > > (Updated Jan. 10, 2014, 7:58 p.m.) > > > Review request for hive, Ashutosh Chauhan and Jakob Homan. > > > Bugs: HIVE-3159 > https://issues.apache.org/jira/browse/HIVE-3159 > > > Repository: hive-git > > > Description > ------- > > Problem: > Hive doesn't support to create a Avro-based table using HQL create table > command. It currently requires to specify Avro schema literal or schema file > name. > For multiple cases, it is very inconvenient for user. > Some of the un-supported use cases: > 1. Create table ... <Avro-SERDE etc.> as SELECT ... from <NON-AVRO FILE> > 2. Create table ... <Avro-SERDE etc.> as SELECT from <AVRO TABLE> > 3. Create table without specifying Avro schema. > > > Diffs > ----- > > ql/src/test/queries/clientpositive/avro_create_as_select.q PRE-CREATION > ql/src/test/queries/clientpositive/avro_create_as_select2.q PRE-CREATION > ql/src/test/queries/clientpositive/avro_no_schema_test.q PRE-CREATION > ql/src/test/queries/clientpositive/avro_without_schema.q PRE-CREATION > ql/src/test/results/clientpositive/avro_create_as_select.q.out PRE-CREATION > ql/src/test/results/clientpositive/avro_create_as_select2.q.out > PRE-CREATION > ql/src/test/results/clientpositive/avro_no_schema_test.q.out PRE-CREATION > ql/src/test/results/clientpositive/avro_without_schema.q.out PRE-CREATION > serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java > 9d58d13 > serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java > PRE-CREATION > serde/src/test/org/apache/hadoop/hive/serde2/avro/TestAvroSerdeUtils.java > 67d5570 > serde/src/test/org/apache/hadoop/hive/serde2/avro/TestTypeInfoToSchema.java > PRE-CREATION > > Diff: https://reviews.apache.org/r/11925/diff/ > > > Testing > ------- > > Wrote a new java Test class for a new Java class. Added a new test case into > existing java test class. In addition, there are 4 .q file for testing > multiple use-cases. > > > Thanks, > > Mohammad Islam > >