You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Ashutosh Chauhan <ha...@apache.org> on 2013/06/30 04:43:04 UTC
Re: Review Request 11925: Hive-3159 Update AvroSerde to determine schema of
new tables
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11925/#review22571
-----------------------------------------------------------
Can you also run all new tests with ant test -Dhadoop.mr.rev=23 to make sure we are getting right results. Else, you might need to add more columns in order-by columns.
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java
<https://reviews.apache.org/r/11925/#comment46291>
I think determining schema from table definition should be default. There are multiple of determining schema. I think order should be:
a) Try table definition.
b) Try schema literal in properties.
c) Try from hdfs.
d) Try from url.
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java
<https://reviews.apache.org/r/11925/#comment46292>
Any particular reason you made this synchronized ?
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java
<https://reviews.apache.org/r/11925/#comment46293>
Have you tested this for both default db as well as non-default db?
serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java
<https://reviews.apache.org/r/11925/#comment46294>
Instead of \n, can you use File.Seperator?
serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java
<https://reviews.apache.org/r/11925/#comment46296>
Is this meant to be Array[tinyint] => bytes?
serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java
<https://reviews.apache.org/r/11925/#comment46295>
Lets take care of this TODO. Should be straight fwd.
- Ashutosh Chauhan
On June 18, 2013, 3:26 a.m., Mohammad Islam wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11925/
> -----------------------------------------------------------
>
> (Updated June 18, 2013, 3:26 a.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 13848b6
> serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java PRE-CREATION
> serde/src/test/org/apache/hadoop/hive/serde2/avro/TestAvroSerdeUtils.java 010f614
> 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
>
>
Re: Review Request 11925: Hive-3159 Update AvroSerde to determine schema of
new tables
Posted by Mohammad Islam <mi...@yahoo.com>.
> On June 30, 2013, 2:43 a.m., Ashutosh Chauhan wrote:
> > Can you also run all new tests with ant test -Dhadoop.mr.rev=23 to make sure we are getting right results. Else, you might need to add more columns in order-by columns.
Tested
> On June 30, 2013, 2:43 a.m., Ashutosh Chauhan wrote:
> > serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java, line 101
> > <https://reviews.apache.org/r/11925/diff/2/?file=307412#file307412line101>
> >
> > Any particular reason you made this synchronized ?
Removed.
> On June 30, 2013, 2:43 a.m., Ashutosh Chauhan wrote:
> > serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java, line 103
> > <https://reviews.apache.org/r/11925/diff/2/?file=307412#file307412line103>
> >
> > Have you tested this for both default db as well as non-default db?
Test case added.
> On June 30, 2013, 2:43 a.m., Ashutosh Chauhan wrote:
> > serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java, line 121
> > <https://reviews.apache.org/r/11925/diff/2/?file=307412#file307412line121>
> >
> > Instead of \n, can you use File.Seperator?
Removed.
> On June 30, 2013, 2:43 a.m., Ashutosh Chauhan wrote:
> > serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java, line 43
> > <https://reviews.apache.org/r/11925/diff/2/?file=307413#file307413line43>
> >
> > Is this meant to be Array[tinyint] => bytes?
Done
> On June 30, 2013, 2:43 a.m., Ashutosh Chauhan wrote:
> > serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java, line 110
> > <https://reviews.apache.org/r/11925/diff/2/?file=307413#file307413line110>
> >
> > Lets take care of this TODO. Should be straight fwd.
Done
- Mohammad
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11925/#review22571
-----------------------------------------------------------
On June 18, 2013, 3:26 a.m., Mohammad Islam wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11925/
> -----------------------------------------------------------
>
> (Updated June 18, 2013, 3:26 a.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 13848b6
> serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java PRE-CREATION
> serde/src/test/org/apache/hadoop/hive/serde2/avro/TestAvroSerdeUtils.java 010f614
> 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
>
>
Re: Review Request 11925: Hive-3159 Update AvroSerde to determine schema of
new tables
Posted by Jakob Homan <jg...@apache.org>.
> On June 29, 2013, 7:43 p.m., Ashutosh Chauhan wrote:
> > serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java, line 70
> > <https://reviews.apache.org/r/11925/diff/2/?file=307412#file307412line70>
> >
> > I think determining schema from table definition should be default. There are multiple of determining schema. I think order should be:
> > a) Try table definition.
> > b) Try schema literal in properties.
> > c) Try from hdfs.
> > d) Try from url.
This is a big change. Avro tables have always been defined via a property. This change is to support a small use case; why switch the entire order?
- Jakob
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11925/#review22571
-----------------------------------------------------------
On July 23, 2013, 2:51 a.m., Mohammad Islam wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11925/
> -----------------------------------------------------------
>
> (Updated July 23, 2013, 2:51 a.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 13848b6
> serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java PRE-CREATION
> serde/src/test/org/apache/hadoop/hive/serde2/avro/TestAvroSerdeUtils.java 010f614
> 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
>
>