Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@haozhun
Created April 4, 2018 22:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save haozhun/03cd09b3fa2456271f2e01759c9c1b8e to your computer and use it in GitHub Desktop.
Save haozhun/03cd09b3fa2456271f2e01759c9c1b8e to your computer and use it in GitHub Desktop.
[frc03 ~]$ which hive
~/apache-hive-1.2.1-bin/bin/hive
[frc03 ~]$ hive
hive> select current_timestamp();
OK
2018-04-04 14:51:31.889
Time taken: 1.202 seconds, Fetched: 1 row(s)
hive> select current_timestamp() - interval '2880' hour;
OK
2017-12-05 13:51:34.923
Time taken: 0.079 seconds, Fetched: 1 row(s)
[root@hadoop-master /]# hive
Logging initialized using configuration in jar:file:/usr/hdp/2.6.3.0-235/hive/lib/hive-common-1.2.1000.2.6.3.0-235.jar!/hive-log4j.properties
hive> select current_timestamp();
OK
2018-04-04 14:56:55.65
Time taken: 1.65 seconds, Fetched: 1 row(s)
hive> select current_timestamp() - interval '2880' hour;
OK
2017-12-05 13:57:00.155
Time taken: 0.116 seconds, Fetched: 1 row(s)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment