mirror of
https://github.com/apache/impala.git
synced 2026-01-06 06:01:03 -05:00
IMPALA-4163: Add sortby() query hint
This change introduces the sortby() query plan hint for insert statements. When specified, sortby(a, b) will add an additional sort step to the plan to order data by columns a, b before inserting it into the target table. Change-Id: I37a3ffab99aaa5d5a4fd1ac674b3e8b394a3c4c0 Reviewed-on: http://gerrit.cloudera.org:8080/5051 Reviewed-by: Marcel Kornacker <marcel@cloudera.com> Tested-by: Internal Jenkins
This commit is contained in:
committed by
Internal Jenkins
parent
68131b3115
commit
ce9b332ee9
@@ -945,3 +945,29 @@ RESET alltypesnopart_insert
|
||||
---- RESULTS
|
||||
: 100
|
||||
====
|
||||
---- QUERY
|
||||
# IMPALA-4163: insert into table sortby() plan hint
|
||||
insert into table alltypesinsert
|
||||
partition (year, month) /*+ clustered,shuffle,sortby(int_col, bool_col) */
|
||||
select * from alltypestiny;
|
||||
---- SETUP
|
||||
DROP PARTITIONS alltypesinsert
|
||||
RESET alltypesinsert
|
||||
---- RESULTS
|
||||
year=2009/month=1/: 2
|
||||
year=2009/month=2/: 2
|
||||
year=2009/month=3/: 2
|
||||
year=2009/month=4/: 2
|
||||
====
|
||||
---- QUERY
|
||||
# IMPALA-4163: insert into table sortby() plan hint
|
||||
insert into table alltypesnopart_insert
|
||||
/*+ clustered,shuffle,sortby(int_col, bool_col) */
|
||||
select id, bool_col, tinyint_col, smallint_col, int_col, bigint_col, float_col,
|
||||
double_col, date_string_col, string_col, timestamp_col from alltypestiny;
|
||||
---- SETUP
|
||||
DROP PARTITIONS alltypesinsert
|
||||
RESET alltypesinsert
|
||||
---- RESULTS
|
||||
: 8
|
||||
====
|
||||
|
||||
Reference in New Issue
Block a user