Grant Henke has uploaded a new patch set (#2) to the change originally created 
by Todd Lipcon. ( http://gerrit.cloudera.org:8080/13342 )

Change subject: WIP: IMPALA-9773: Temporal (ASOF) query support for Kudu tables
......................................................................

WIP: IMPALA-9773: Temporal (ASOF) query support for Kudu tables

This adds support for 'table ASOF TIMESTAMP <timestamp>' for Kudu tables
in queries. For example:

functional_kudu> select * from tinytable;
Query submitted at: 2019-05-15 00:47:57 (Coordinator: 
http://va1022.halxg.cloudera.com:25000)
+----------+---------+
| a        | b       |
+----------+---------+
| aaaaaaa  | bbbbbbb |
| ccccc    | dddd    |
| eeeeeeee | f       |
+----------+---------+
Fetched 3 row(s) in 0.17s

functional_kudu> delete from tinytable;
Modified 3 row(s), 0 row error(s) in 0.12s

functional_kudu> insert into tinytable select * from tinytable asof timestamp 
utc_timestamp() - interval 1 minute;
Modified 3 row(s), 0 row error(s) in 0.13s

[va1022.halxg.cloudera.com:21000] functional_kudu> select * from tinytable;
+----------+---------+
| a        | b       |
+----------+---------+
| aaaaaaa  | bbbbbbb |
| ccccc    | dddd    |
| eeeeeeee | f       |
+----------+---------+
Fetched 3 row(s) in 0.15s

WIP: needs tests, and probably should be "AS OF" instead of "ASOF", but I
couldn't convince the parser to not have a shift/reduce conflict. Also
seems likely we should be taking timestamps in localtime, rather than
UTC time -- otherwise it's quite confusing that 'as of now()' actually
returns a time in the future/past because it's interpreting a local
timestamp as a UTC timestamp.

Change-Id: I939898548c307810d509cf486e2c0f1f335a5ac4
---
M be/src/exec/kudu-scan-node-base.cc
M be/src/exec/kudu-scan-node-base.h
M be/src/exec/kudu-scanner.cc
M common/thrift/PlanNodes.thrift
M fe/src/main/cup/sql-parser.cup
M fe/src/main/java/org/apache/impala/analysis/BaseTableRef.java
M fe/src/main/java/org/apache/impala/analysis/InlineViewRef.java
M fe/src/main/java/org/apache/impala/analysis/TableRef.java
M fe/src/main/java/org/apache/impala/planner/KuduScanNode.java
M fe/src/main/jflex/sql-scanner.flex
10 files changed, 83 insertions(+), 16 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/42/13342/2
--
To view, visit http://gerrit.cloudera.org:8080/13342
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I939898548c307810d509cf486e2c0f1f335a5ac4
Gerrit-Change-Number: 13342
Gerrit-PatchSet: 2
Gerrit-Owner: Todd Lipcon <[email protected]>
Gerrit-Reviewer: Andrew Wong <[email protected]>
Gerrit-Reviewer: Grant Henke <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Nong Li (20)

Reply via email to