PageRenderTime 25ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 2ms app.codeStats 0ms

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

#
text | 30 lines | 20 code | 10 blank | 0 comment | 0 complexity | 14d2e43cc12bd518a0d2d47b871be2e4 MD5 | raw file
 1drop table tstsrc;
 2
 3set 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;
 4
 5create table tstsrc as select * from src;
 6desc extended tstsrc;
 7select count(1) from tstsrc;
 8desc extended tstsrc;
 9drop table tstsrc;
10
11drop table tstsrcpart;
12create table tstsrcpart like srcpart;
13
14set hive.exec.dynamic.partition.mode=nonstrict;
15set hive.exec.dynamic.partition=true;
16
17
18insert overwrite table tstsrcpart partition (ds, hr) select key, value, ds, hr from srcpart;
19
20desc extended tstsrcpart;
21desc extended tstsrcpart partition (ds='2008-04-08', hr='11');
22desc extended tstsrcpart partition (ds='2008-04-08', hr='12');
23
24select count(1) from tstsrcpart where ds = '2008-04-08' and hr = '11';
25
26desc extended tstsrcpart;
27desc extended tstsrcpart partition (ds='2008-04-08', hr='11');
28desc extended tstsrcpart partition (ds='2008-04-08', hr='12');
29
30drop table tstsrcpart;