[ 
https://issues.apache.org/jira/browse/TAJO-1982?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15011036#comment-15011036
 ] 

Jaehwa Jung commented on TAJO-1982:
-----------------------------------

Currently, Tajo implemented Avro Scanner and Appender on the condition that DDL 
includes schema literal and schema path. But in recent Hive versions 0.14 and 
later, users can create Avro schema without schema literal and schema path. In 
my examples, I created nation_avro table as follows on hive.
{code:xml}
CREATE TABLE nation_avro (
  n_nationkey bigint , 
  n_name string, 
  n_regionkey bigint, 
  n_comment string) 
STORED AS AVRO;

insert overwrite table nation_avro
select n_nationkey, n_name, n_regionkey, n_comment from nation;
{code}

Basically, we need to consider to provide creating Avro schema without schema 
literal and path.

> Query over avrò file with HiveCatalogStore fails with RuntimeException
> ----------------------------------------------------------------------
>
>                 Key: TAJO-1982
>                 URL: https://issues.apache.org/jira/browse/TAJO-1982
>             Project: Tajo
>          Issue Type: Bug
>          Components: Catalog, Storage
>            Reporter: Jaehwa Jung
>
> Query over avrò file with HiveCatalogstore fails with RuntimeException as 
> following:
> {code:xml}
> default> \d nation_avro;
> table name: default.nation_avro
> table uri: hdfs://localhost:9010/user/hive/warehouse/nation_avro
> store type: AVRO
> number of rows: 0
> volume: 2.6 kB
> Options: 
>       'totalSize'='2616'
>       'numRows'='25'
>       'rawDataSize'='0'
>       'COLUMN_STATS_ACCURATE'='true'
>       'numFiles'='1'
>       'transient_lastDdlTime'='1447854230'
> schema: 
> n_nationkey   INT8
> n_name        TEXT
> n_regionkey   INT8
> n_comment     TEXT
> default> select * from nation_avro;
> ERROR: internal error: No Avro schema for table.
> {code}
> Stack trace from TajoMaster logs:
> {code:xml}
> 2015-11-18 22:45:40,253 ERROR org.apache.tajo.master.GlobalEngine:
> Stack Trace:
> java.lang.RuntimeException: No Avro schema for table.
>         at 
> org.apache.tajo.storage.avro.AvroUtil.getAvroSchema(AvroUtil.java:41)
>         at org.apache.tajo.storage.avro.AvroScanner.init(AvroScanner.java:85)
>         at 
> org.apache.tajo.engine.planner.physical.SeqScanExec.initScanner(SeqScanExec.java:286)
>         at 
> org.apache.tajo.engine.planner.physical.SeqScanExec.init(SeqScanExec.java:191)
>         at 
> org.apache.tajo.engine.planner.physical.PartitionMergeScanExec.initScanExecutors(PartitionMergeScanExec.java:80)
>         at 
> org.apache.tajo.engine.planner.physical.PartitionMergeScanExec.init(PartitionMergeScanExec.java:67)
>         at 
> org.apache.tajo.master.exec.NonForwardQueryResultFileScanner.initSeqScanExec(NonForwardQueryResultFileScanner.java:123)
>         at 
> org.apache.tajo.master.exec.NonForwardQueryResultFileScanner.init(NonForwardQueryResultFileScanner.java:102)
>         at 
> org.apache.tajo.master.exec.QueryExecutor.execSimpleQuery(QueryExecutor.java:306)
>         at 
> org.apache.tajo.master.exec.QueryExecutor.execute(QueryExecutor.java:130)
>         at 
> org.apache.tajo.master.GlobalEngine.executeQuery(GlobalEngine.java:191)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to