You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by Mohammad Islam <mi...@yahoo.com> on 2013/11/13 00:05:54 UTC
Re: Review Request 11925: Hive-3159 Update AvroSerde to determine schema of
new tables
> On July 29, 2013, 5:41 p.m., Jakob Homan wrote:
> > There is still no text covering a map-reduce job on an already existing, non-Avro table into an avro table. ie, create a text table, populate it, run a CTAS to manipulate the data into an Avro table.
>
> Mohammad Islam wrote:
> In general, Hive creates "internal" column names such as col0, col1 etc. Due to this, I didn't able to copy non-avro data to avro data and run select SQL. Only option is to change the current behavior to reuse the provided column names. Separate JIRA regarding this could be a choice.
>
>
>
> Jakob Homan wrote:
> Wouldn't select * or using the new column names (they're named deterministically) work? This is a major test since otherwise we're missing the most important code path...
> ie
> have a text file c1, c2, c3
> create table t1
> load data into t1 from text file
> create table a1 as select c3, c2 where c2 = "foo" order by c3;
> select * from a1;
> describe extended a1;
>
> And verify in the q file's result that the table is avro and that the correct rows and columns got converted.
I agree that we need to support this use case as well.
Current patch works on two other uses case.
Created a separate JIRA to handle this use case that I suspect is a slightly different issue.
New JIRA: https://issues.apache.org/jira/browse/HIVE-5803
- Mohammad
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/11925/#review24149
-----------------------------------------------------------
On Aug. 8, 2013, 12:24 a.m., Mohammad Islam wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/11925/
> -----------------------------------------------------------
>
> (Updated Aug. 8, 2013, 12:24 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
>
>