Wenzhe Zhou has uploaded a new patch set (#2). ( 
http://gerrit.cloudera.org:8080/21409 )

Change subject: IMPALA-13018: Block push down of conjuncts with implicit 
casting on base columns for jdbc tables
......................................................................

IMPALA-13018: Block push down of conjuncts with implicit casting on base 
columns for jdbc tables

The query of q80a consists BETWEEN with casting to timestamp in where
clause like:
  d_date between cast('2000-08-23' as timestamp)
    and (cast('2000-08-23' as timestamp) + interval 30 days)
Between predicate does cast all exprs to compatible types. Planner
generates predicates for DataSourceScanNode as:
  CAST(d_date AS TIMESTAMP) >= TIMESTAMP '2000-08-23 00:00:00',
  CAST(d_date AS TIMESTAMP) <= TIMESTAMP '2000-09-22 00:00:00'
But casting to Date/Timestamp for a column cannot be pushed down to JDBC
table now. This patch fixes the issue by blocking such conjuncts with
implicit unsafe casting or casting to date/timestamp to be added into
offered predicate list for JDBC table.
Note that explicate castings on base columns are not allowed to
pushdown.

Testing:
 - Passed all tpcds queries for JDBC tables, including q80a.
 - Passed core test

Change-Id: Iabd7e28b8d5f11f25a000dc4c9ab65895056b572
---
M fe/src/main/java/org/apache/impala/planner/DataSourceScanNode.java
M tests/query_test/test_tpcds_queries.py
2 files changed, 21 insertions(+), 5 deletions(-)


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

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: Iabd7e28b8d5f11f25a000dc4c9ab65895056b572
Gerrit-Change-Number: 21409
Gerrit-PatchSet: 2
Gerrit-Owner: Wenzhe Zhou <[email protected]>
Gerrit-Reviewer: Abhishek Rawat <[email protected]>
Gerrit-Reviewer: Anonymous Coward <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Riza Suminto <[email protected]>
Gerrit-Reviewer: Wenzhe Zhou <[email protected]>

Reply via email to