[ https://issues.apache.org/jira/browse/HIVE-5456?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Carl Steinbach updated HIVE-5456: --------------------------------- Labels: Avro AvroSerde (was: ) > Queries fail on avro backed table with empty partition > ------------------------------------------------------- > > Key: HIVE-5456 > URL: https://issues.apache.org/jira/browse/HIVE-5456 > Project: Hive > Issue Type: Bug > Components: Query Processor > Affects Versions: 0.11.0, 0.13.1 > Reporter: Prasad Mujumdar > Assignee: Chaoyu Tang > Labels: Avro, AvroSerde > Fix For: 0.14.0 > > Attachments: HIVE-5456.patch, HIVE-5456.patch > > > The following query fails > {noformat} > DROP TABLE IF EXISTS episodes_partitioned; > CREATE TABLE episodes_partitioned > PARTITIONED BY (doctor_pt INT) > 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": "episodes", > "type": "record", > "fields": [ > { > "name":"title", > "type":"string", > "doc":"episode title" > }, > { > "name":"air_date", > "type":"string", > "doc":"initial date" > }, > { > "name":"doctor", > "type":"int", > "doc":"main actor playing the Doctor in episode" > } > ] > }'); > ALTER TABLE episodes_partitioned ADD PARTITION (doctor_pt=4); > ALTER TABLE episodes_partitioned ADD PARTITION (doctor_pt=5); > SELECT COUNT(*) FROM episodes_partitioned; > {noformat} > with following exception > {noformat} > java.io.IOException: org.apache.hadoop.hive.serde2.avro.AvroSerdeException: > Neither avro.schema.literal nor avro.schema.url specified, can't determine > table schema > at > org.apache.hadoop.hive.ql.io.avro.AvroContainerOutputFormat.getHiveRecordWriter(AvroContainerOutputFormat.java:61) > at > org.apache.hadoop.hive.ql.exec.Utilities.createEmptyFile(Utilities.java:2869) > at > org.apache.hadoop.hive.ql.exec.Utilities.createDummyFileForEmptyPartition(Utilities.java:2901) > at > org.apache.hadoop.hive.ql.exec.Utilities.getInputPaths(Utilities.java:2825) > at > org.apache.hadoop.hive.ql.exec.mr.ExecDriver.execute(ExecDriver.java:381) > at > org.apache.hadoop.hive.ql.exec.mr.MapRedTask.execute(MapRedTask.java:136) > at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:151) > at > org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:65) > at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1409) > at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1187) > at org.apache.hadoop.hive.ql.Driver.runInternal(Driver.java:1015) > at org.apache.hadoop.hive.ql.Driver.run(Driver.java:883) > at > org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:259) > at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:216) > at > org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:413) > at > org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:348) > at > org.apache.hadoop.hive.cli.CliDriver.processReader(CliDriver.java:446) > at > org.apache.hadoop.hive.cli.CliDriver.processFile(CliDriver.java:456) > at > org.apache.hadoop.hive.cli.CliDriver.executeDriver(CliDriver.java:737) > at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:675) > at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:614) > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)