> On July 18, 2014, 1:57 p.m., Tom White wrote:
> > serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerDe.java, line 112
> > <https://reviews.apache.org/r/23387/diff/9/?file=634614#file634614line112>
> >
> >     Is it possible to default name to table name, namespace to database 
> > name, and doc to table comment?
> 
> Ashish Singh wrote:
>     I was planning to do this, but slipped off my mind. Thanks for pointing 
> this out. I don't think it is possible to retrieve database name inside 
> serde. Addressed name and doc.
> 
> Tom White wrote:
>     Thanks for fixing this. There's no test that "name" and "comment" are 
> picked up from the table definition - perhaps you could add one, or at least 
> confirm it manually. I couldn't see where in Hive they get set...
>     
>     Otherwise, +1 from me - thanks for addressing all my comments. This is a 
> great feature to add.
> 
> Ashish Singh wrote:
>     Tom, actually its tested by all the unit tests now. Look at the diffs in 
> https://reviews.apache.org/r/23387/diff/8-9/#index_header.
> 
> Tom White wrote:
>     Unless I am missing something, the unit tests in TestTypeInfoToSchema 
> don't test this since they hardcode the table name to "avrotest" and the 
> table comment to "This is to test hive-avro".
>     
>     Perhaps this is tested indirectly through the ql tests since Avro schema 
> resolution rules mean that a record schema's name must match for both the 
> reader and writer. However, this isn't true for comments (Avro schema doc), 
> and it would be good to confirm that inserting data into an Avro-backed Hive 
> table creates Avro files with the expected top-level name and comment.
> 
> Ashish Singh wrote:
>     Tom, my bad. I thought we are talking about having hive typeinfo in doc 
> for corresponding avro schema. 
>     
>     I did verify that top-level name and comment are being created as 
> expected before posting the patch here. I log created avro schema in 
> AvroSerde.java and that came handy to verify this.

OK, thanks for clarifying. +1 from me.


- Tom


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/23387/#review48120
-----------------------------------------------------------


On July 22, 2014, 5:13 p.m., Ashish Singh wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/23387/
> -----------------------------------------------------------
> 
> (Updated July 22, 2014, 5:13 p.m.)
> 
> 
> Review request for hive.
> 
> 
> Bugs: HIVE-6806
>     https://issues.apache.org/jira/browse/HIVE-6806
> 
> 
> Repository: hive-git
> 
> 
> Description
> -------
> 
> HIVE-6806: Native avro support
> 
> 
> Diffs
> -----
> 
>   ql/src/java/org/apache/hadoop/hive/ql/io/AvroStorageFormatDescriptor.java 
> PRE-CREATION 
>   ql/src/java/org/apache/hadoop/hive/ql/io/IOConstants.java 
> 1bae0a8fee04049f90b16d813ff4c96707b349c8 
>   
> ql/src/main/resources/META-INF/services/org.apache.hadoop.hive.ql.io.StorageFormatDescriptor
>  a23ff115512da5fe3167835a88d582c427585b8e 
>   ql/src/test/org/apache/hadoop/hive/ql/io/TestStorageFormatDescriptor.java 
> d53ebc65174d66bfeee25fd2891c69c78f9137ee 
>   ql/src/test/queries/clientpositive/avro_compression_enabled_native.q 
> PRE-CREATION 
>   ql/src/test/queries/clientpositive/avro_decimal_native.q PRE-CREATION 
>   ql/src/test/queries/clientpositive/avro_joins_native.q PRE-CREATION 
>   ql/src/test/queries/clientpositive/avro_native.q PRE-CREATION 
>   ql/src/test/queries/clientpositive/avro_partitioned_native.q PRE-CREATION 
>   ql/src/test/queries/clientpositive/avro_schema_evolution_native.q 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/avro_compression_enabled_native.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/avro_decimal_native.q.out PRE-CREATION 
>   ql/src/test/results/clientpositive/avro_joins_native.q.out PRE-CREATION 
>   ql/src/test/results/clientpositive/avro_native.q.out PRE-CREATION 
>   ql/src/test/results/clientpositive/avro_partitioned_native.q.out 
> PRE-CREATION 
>   ql/src/test/results/clientpositive/avro_schema_evolution_native.q.out 
> PRE-CREATION 
>   serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroDeserializer.java 
> 0db12437406170686a21b6055d83156fe5d6a55f 
>   serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerDe.java 
> 1fe31e0034f8988d03a0c51a90904bb93e7cb157 
>   serde/src/java/org/apache/hadoop/hive/serde2/avro/AvroSerdeUtils.java 
> 4564e75d9bfc73f8e10f160e2535f1a08b90ff79 
>   serde/src/java/org/apache/hadoop/hive/serde2/avro/TypeInfoToSchema.java 
> PRE-CREATION 
>   serde/src/test/org/apache/hadoop/hive/serde2/avro/TestTypeInfoToSchema.java 
> PRE-CREATION 
>   serde/src/test/resources/avro-nested-struct.avsc PRE-CREATION 
>   serde/src/test/resources/avro-struct.avsc PRE-CREATION 
> 
> Diff: https://reviews.apache.org/r/23387/diff/
> 
> 
> Testing
> -------
> 
> Added qTests and unit tests
> 
> 
> Thanks,
> 
> Ashish Singh
> 
>

Reply via email to