Thursday, 15 August 2013

hive order by is not working in a subquery -



hive order by is not working in a subquery -

i have query -

create table traces_orc1 (pc bigint, opcode string, frequency string) row format delimited fields terminated '44' stored orc; insert overwrite table traces_orc1 select conv(pc,16,10) pc, opcode, count(*) traces_texttemp frequency grouping pc, opcode; create table traces_orctemp (pc bigint, opcode string, frequency string) row format delimited fields terminated '44' stored orc; insert overwrite table traces_orctemp select pc, opcode, frequency traces_orc1 order pc asc;

i trying merge these 2 statements in 1 -

create table traces_orc2 ( pcount bigint, opcode string, frequency string) row format delimited fields terminated '44' stored textfile; insert overwrite table traces_orc2 select conv(trim(traces_text.pc),16,10) pcount, opcode, count(*) frequency traces_text grouping pcount,opcode order pcount asc;

but wont work. order by not working when write 1 statement

any inputs ??

have tried :

insert overwrite table traces_orc2 select pcount, opcode, frequency (select conv(trim(traces_text.pc),16,10) pcount, opcode, count(*) frequency traces_text grouping pcount,opcode) order pcount asc;

it may forcefulness hive fire sec cut down phase sorting.

hive

No comments:

Post a Comment