Skip to content

Instantly share code, notes, and snippets.

@vtstran
Created June 18, 2017 13:00
Show Gist options
  • Save vtstran/ed5933b1072ca04710ce22fe36ba36ba to your computer and use it in GitHub Desktop.
Save vtstran/ed5933b1072ca04710ce22fe36ba36ba to your computer and use it in GitHub Desktop.
[durian-2:21000] > select c2=cast('09:09:09' as timestamp) from tt;
Query: select c2=cast('09:09:09' as timestamp) from tt
Query submitted at: 2017-06-18 05:59:15 (Coordinator: http://durian-2.gce.cloudera.com:25000)
Query progress can be monitored at: http://durian-2.gce.cloudera.com:25000/query_plan?query_id=a54127dccdde41d2:39a89e6d00000000
+------------------------------------+
| c2 = cast('09:09:09' as timestamp) |
+------------------------------------+
| true |
+------------------------------------+
[durian-2:21000] > select * from tt where c2 between cast('00:00:00' as timestamp) and cast('23:59:59' as timestamp);
Query: select * from tt where c2 between cast('00:00:00' as timestamp) and cast('23:59:59' as timestamp)
Query submitted at: 2017-06-17 23:32:07 (Coordinator: http://durian-2.gce.cloudera.com:25000)
Query progress can be monitored at: http://durian-2.gce.cloudera.com:25000/query_plan?query_id=244e65fd14792b79:21a4c13c00000000
Fetched 0 row(s) in 0.04s
[durian-2:21000] > select * from tt where c2 > cast('23:59:59' as timestamp);
Query: select * from tt where c2 > cast('23:59:59' as timestamp)
Query submitted at: 2017-06-17 23:32:39 (Coordinator: http://durian-2.gce.cloudera.com:25000)
Query progress can be monitored at: http://durian-2.gce.cloudera.com:25000/query_plan?query_id=174efc5d1f596cda:6e581a2000000000
+----+----------+
| c1 | c2 |
+----+----------+
| 1 | 09:09:09 |
+----+----------+
Fetched 1 row(s) in 0.13s
[durian-2:21000] > select * from tt where c2 < cast('00:00:00' as timestamp);
Query: select * from tt where c2 < cast('00:00:00' as timestamp)
Query submitted at: 2017-06-17 23:32:57 (Coordinator: http://durian-2.gce.cloudera.com:25000)
Query progress can be monitored at: http://durian-2.gce.cloudera.com:25000/query_plan?query_id=1747ad65423d9ffb:7b818a9000000000
Fetched 0 row(s) in 0.13s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment