[ 
https://issues.apache.org/jira/browse/HIVE-4195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ashutosh Chauhan resolved HIVE-4195.
------------------------------------

       Resolution: Fixed
    Fix Version/s: 0.11.0

HIVE-3308 fixes this issues. Feel free to reopen if you can still reproduce 
this on trunk.
                
> Avro SerDe causes incorrect behavior in unrelated tables
> --------------------------------------------------------
>
>                 Key: HIVE-4195
>                 URL: https://issues.apache.org/jira/browse/HIVE-4195
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Skye Wanderman-Milne
>             Fix For: 0.11.0
>
>
> When I run a file that first creates an Avro table using the Avro SerDe, then 
> immediately creates an LZO text table and inserts data into the LZO table, 
> the resulting LZO table contain Avro data files. When I remove the Avro 
> CREATE TABLE statement, the LZO table contains .lzo files as expected.
> {noformat}
> DROP TABLE IF EXISTS avro_table;
> CREATE EXTERNAL TABLE avro_table
> ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.avro.AvroSerDe'
> STORED AS
> INPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerInputFormat'
> OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat'
> TBLPROPERTIES ('avro.schema.literal' = '{
> "namespace": "testing.hive.avro.serde",
> "name": "test_record",
> "type": "record",
> "fields": [
> {"name":"int1", "type":"long"},
> {"name":"string1", "type":"string"}
> ]
> }');
> DROP TABLE IF EXISTS lzo_table;
> CREATE EXTERNAL TABLE lzo_table (
> id int,
> bool_col boolean,
> tinyint_col tinyint,
> smallint_col smallint,
> int_col int,
> bigint_col bigint,
> float_col float,
> double_col double,
> date_string_col string,
> string_col string,
> timestamp_col timestamp)
> STORED AS 
> INPUTFORMAT 'com.hadoop.mapred.DeprecatedLzoTextInputFormat'
> OUTPUTFORMAT 'org.apache.hadoop.hive.ql.io.HiveIgnoreKeyTextOutputFormat'
> ;
> SET hive.exec.compress.output=true;
> SET mapred.output.compression.type=BLOCK;
> SET mapred.output.compression.codec=com.hadoop.compression.lzo.LzopCodec;
> SET hive.exec.dynamic.partition.mode=nonstrict;
> SET hive.exec.dynamic.partition=true;
> SET mapred.max.split.size=256000000;
> SET hive.input.format=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
> insert overwrite table lzo_table SELECT id, bool_col, tinyint_col, 
> smallint_col, int_col, bigint_col, float_col, double_col, date_string_col, 
> string_col, timestamp_col FROM src_table;
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to