Laszlo Pinter created ORC-562:
---------------------------------

             Summary: Don't wrap readerSchema in acidSchema, if readerSchema is 
already acid
                 Key: ORC-562
                 URL: https://issues.apache.org/jira/browse/ORC-562
             Project: ORC
          Issue Type: Bug
          Components: Java
    Affects Versions: 1.6.0, 1.5.6
            Reporter: Laszlo Pinter


{code:sql}
create table tbl1 (a int, b string) partitioned by (ds string) stored as orc 
tblproperties ('transactional'='true');
insert into tbl1 partition (ds) values (1, 'fred', 'today'), (2, 'wilma', 
'yesterday');
{code}
As this table is transactional, all the modifications will generate a new delta 
directory, containing a delta file in orc format. The schema of this file will 
be
{code:sql}
struct<operation:int,originaltransaction:bigint,bucket:int,rowid:bigint,currenttransaction:bigint,row:struct<a:int,b:string>>
{code}

If I create a new partitioned table with the very same schema, and change the 
partition location to one of the delta directories, I would assume that I would 
be able to run queries against the contents of the delta file. 

Right now this is not possible in orc, because the original readerschema is 
wrapped in acidschema again, regardless that the readerschema is already acid.

{code:sql}
struct<operation:int,originalTransaction:bigint,bucket:int,rowId:bigint,currentTransaction:bigint,row:struct<operation:int,originaltransaction:bigint,bucket:int,rowid:bigint,currenttransaction:bigint,row:struct<a:int,b:string>>>
{code}




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to