FAQ
Often I forget to name a column that results from running an
aggregation. Then, I'm stuck: describe table lists those columns by
their default names, i.e. something like _c1, but I can't seem to
query or rename those columns:

alter table fb_images1 change _c5 ref_array array<string>;
FAILED: Parse Error: line 1:30 mismatched input '_c5' expecting
Identifier in rename column name

Is there a resolution for this? One workaround would be to create a
new table and load the data into it, but it seems inelegant to say the
least.

--Leo

Search Discussions

  • John Sichi at Dec 20, 2010 at 11:36 pm
    Enclose them in backticks.

    alter table fb_images1 change `_c5` ref_array array<string>;

    JVS
    On Dec 20, 2010, at 3:23 PM, Leo Alekseyev wrote:

    Often I forget to name a column that results from running an
    aggregation. Then, I'm stuck: describe table lists those columns by
    their default names, i.e. something like _c1, but I can't seem to
    query or rename those columns:

    alter table fb_images1 change _c5 ref_array array<string>;
    FAILED: Parse Error: line 1:30 mismatched input '_c5' expecting
    Identifier in rename column name

    Is there a resolution for this? One workaround would be to create a
    new table and load the data into it, but it seems inelegant to say the
    least.

    --Leo

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupuser @
categorieshive, hadoop
postedDec 20, '10 at 11:23p
activeDec 20, '10 at 11:36p
posts2
users2
websitehive.apache.org

2 users in discussion

John Sichi: 1 post Leo Alekseyev: 1 post

People

Translate

site design / logo © 2022 Grokbase