You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Zhou Xu (Code Review)" <ge...@cloudera.org> on 2020/01/09 08:06:58 UTC

[Impala-ASF-CR] IMPALA-9035: Simplify casting string to timestamp. This change will help with queries generated by some BI tools. Case 1: Simplify 'string -> bigint -> timestamp' TO 'string -> timestamp': cast(unix timestamp('timestr') as timestamp) -> cast('timestr' as

Zhou Xu has uploaded a new patch set (#4). ( http://gerrit.cloudera.org:8080/14896 )

Change subject: IMPALA-9035: Simplify casting string to timestamp. This change will help with queries generated by some BI tools. Case 1: Simplify 'string -> bigint -> timestamp' TO 'string -> timestamp': cast(unix_timestamp('timestr') as timestamp) -> cast('timestr' as 
......................................................................

IMPALA-9035: Simplify casting string to timestamp.
This change will help with queries generated by some BI tools.
Case 1:
Simplify 'string -> bigint -> timestamp' TO 'string -> timestamp':
cast(unix_timestamp('timestr') as timestamp) -> cast('timestr' as timestamp)
Case 2:
Simplify 'string[fmt] -> bigint -> timestamp' TO 'string -> timestamp':
cast(unix_timestamp('timestr', 'fmt') as timestamp) -> to_timestamp('timestr', 'fmt')

Tests:
Add front-end tests in ExprRewriteRulesTest.

Change-Id: I4ed72d6e7886eaf50d2be60cf45170ffaef5e72d
---
M fe/src/main/java/org/apache/impala/analysis/Analyzer.java
A fe/src/main/java/org/apache/impala/rewrite/SimplifyCastStringToTimestamp.java
M fe/src/test/java/org/apache/impala/analysis/ExprRewriteRulesTest.java
3 files changed, 95 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/96/14896/4
-- 
To view, visit http://gerrit.cloudera.org:8080/14896
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4ed72d6e7886eaf50d2be60cf45170ffaef5e72d
Gerrit-Change-Number: 14896
Gerrit-PatchSet: 4
Gerrit-Owner: Zhou Xu <pe...@gmail.com>
Gerrit-Reviewer: Attila Jeges <at...@cloudera.com>
Gerrit-Reviewer: Gabor Kaszab <ga...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Zhou Xu <pe...@gmail.com>