Grokbase Groups Hive user August 2011
FAQ
create table part (a int,b int) PARTITIONED by (c int);

create index part_idx on table part(b,c) AS 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' WITH DEFERRED REBUILD
partitioned by (a) ;

hive> create index part_idx on table part(b,c) AS 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' WITH DEFERRED REBUILD
partitioned by (a) ;
FAILED: Parse Error: line 2:0 mismatched input 'partitioned' expecting EOF near 'REBUILD'

hive>


If I remove the partitioned by (a), then the index can be created. But I need to partition it on column. Is that not supported yet or I made some mistake?

Search Discussions

  • John Sichi at Aug 14, 2011 at 6:41 pm
    The wiki docs are incorrect here. CREATE INDEX does not yet supported a PARTITIONED BY clause; that was added in the spec to support HIVE-1499, which hasn't been implemented yet.

    For now, the index partitioning always follows the table partitioning exactly.

    JVS
    On Aug 14, 2011, at 3:22 AM, Daniel,Wu wrote:

    create table part (a int,b int) PARTITIONED by (c int);

    create index part_idx on table part(b,c) AS 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' WITH DEFERRED REBUILD
    partitioned by (a) ;

    hive> create index part_idx on table part(b,c) AS 'org.apache.hadoop.hive.ql.index.compact.CompactIndexHandler' WITH DEFERRED REBUILD
    partitioned by (a) ;
    FAILED: Parse Error: line 2:0 mismatched input 'partitioned' expecting EOF near 'REBUILD'

    hive>


    If I remove the partitioned by (a), then the index can be created. But I need to partition it on column. Is that not supported yet or I made some mistake?


Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedAug 14, '11 at 10:23a
activeAug 14, '11 at 6:41p
posts2
users2
websitehive.apache.org

2 users in discussion

John Sichi: 1 post Daniel,Wu: 1 post

People

Translate

site design / logo © 2021 Grokbase