PageRenderTime 63ms CodeModel.GetById 21ms RepoModel.GetById 0ms 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
Possible License(s): Apache-2.0, BSD-3-Clause, JSON, CPL-1.0
  1. drop table tstsrc;
  2. set 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;
  3. create table tstsrc as select * from src;
  4. desc extended tstsrc;
  5. select count(1) from tstsrc;
  6. desc extended tstsrc;
  7. drop table tstsrc;
  8. drop table tstsrcpart;
  9. create table tstsrcpart like srcpart;
  10. set hive.exec.dynamic.partition.mode=nonstrict;
  11. set hive.exec.dynamic.partition=true;
  12. insert overwrite table tstsrcpart partition (ds, hr) select key, value, ds, hr from srcpart;
  13. desc extended tstsrcpart;
  14. desc extended tstsrcpart partition (ds='2008-04-08', hr='11');
  15. desc extended tstsrcpart partition (ds='2008-04-08', hr='12');
  16. select count(1) from tstsrcpart where ds = '2008-04-08' and hr = '11';
  17. desc extended tstsrcpart;
  18. desc extended tstsrcpart partition (ds='2008-04-08', hr='11');
  19. desc extended tstsrcpart partition (ds='2008-04-08', hr='12');
  20. drop table tstsrcpart;