PageRenderTime 18ms CodeModel.GetById 13ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/tags/release-0.0.0-rc0/hive/external/ql/src/test/queries/clientpositive/sample10.q

#
text | 25 lines | 15 code | 10 blank | 0 comment | 0 complexity | 4ca6e191425dd59f45e5be3bd7976dae MD5 | raw file
 1
 2set hive.exec.dynamic.partition=true;
 3set hive.exec.dynamic.partition.mode=nonstrict;
 4set hive.enforce.bucketing=true;
 5set hive.exec.reducers.max=4;
 6set hive.input.format=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
 7set hive.default.fileformat=RCFILE;
 8set hive.exec.pre.hooks = org.apache.hadoop.hive.ql.hooks.PreExecutePrinter,org.apache.hadoop.hive.ql.hooks.EnforceReadOnlyTables,org.apache.hadoop.hive.ql.hooks.UpdateInputAccessTimeHook$PreExec;
 9
10-- EXCLUDE_HADOOP_MAJOR_VERSIONS(0.17, 0.18, 0.19)
11
12create table srcpartbucket (key string, value string) partitioned by (ds string, hr string) clustered by (key) into 4 buckets;
13
14insert overwrite table srcpartbucket partition(ds, hr) select * from srcpart where ds is not null and key < 10;
15
16explain extended
17select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds;
18
19select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 4 on key) where ds is not null group by ds;
20
21select ds, count(1) from srcpartbucket tablesample (bucket 1 out of 2 on key) where ds is not null group by ds;
22
23select * from srcpartbucket where ds is not null;
24
25