[Impala-ASF-CR] IMPALA-13018: Fix test tpcds q80a for JDBC table

2024-05-07 Thread Abhishek Rawat (Code Review)
Abhishek Rawat has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21409 )

Change subject: IMPALA-13018: Fix test_tpcds_q80a for JDBC table
..


Patch Set 1:

(2 comments)

http://gerrit.cloudera.org:8080/#/c/21409/1//COMMIT_MSG
Commit Message:

http://gerrit.cloudera.org:8080/#/c/21409/1//COMMIT_MSG@7
PS1, Line 7: IMPALA-13018: Fix test_tpcds_q80a for JDBC table
Maybe update the title to something generic, since this applies to other 
queries also and not just this particular query.

Maybe:
"Block push down of conjuncts with expressions on base column values for jdbc 
tables"


http://gerrit.cloudera.org:8080/#/c/21409/1//COMMIT_MSG@17
PS1, Line 17: But casting to Date/Timestamp for a column cannot be pushed down 
to JDBC
I'm wondering if this applies to other non Date/Timestamp types also? Can we do 
proper pushdown if TBinaryPredicate expects TColumnDesc to be one of the 
operands.

struct TBinaryPredicate {
  // Column on which the predicate is applied. Always set.
  1: optional TColumnDesc col

  // Comparison operator. Always set.
  2: optional TComparisonOp op

  // Value on the right side of the binary predicate. Always set.
  3: optional Data.TColumnValue value
}

Basically, if you have predicate like following, can it be properly pushed down?

CAST (stringCol AS INT) >= 1234



--
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: comment
Gerrit-Change-Id: Iabd7e28b8d5f11f25a000dc4c9ab65895056b572
Gerrit-Change-Number: 21409
Gerrit-PatchSet: 1
Gerrit-Owner: Wenzhe Zhou 
Gerrit-Reviewer: Abhishek Rawat 
Gerrit-Reviewer: Anonymous Coward 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Tue, 07 May 2024 19:35:23 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13018: Fix test tpcds q80a for JDBC table

2024-05-07 Thread Wenzhe Zhou (Code Review)
Wenzhe Zhou has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21409 )

Change subject: IMPALA-13018: Fix test_tpcds_q80a for JDBC table
..


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21409/1/fe/src/main/java/org/apache/impala/planner/DataSourceScanNode.java
File fe/src/main/java/org/apache/impala/planner/DataSourceScanNode.java:

http://gerrit.cloudera.org:8080/#/c/21409/1/fe/src/main/java/org/apache/impala/planner/DataSourceScanNode.java@300
PS1, Line 300: castExpr.getType().isDateOrTimeType()
> nit: Just want to double check, is CastExpr OK for types other than Date/Ti
Other numeric and string types are ok.
For future release, we need to add TExpr to TBinaryPredicate.



--
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: comment
Gerrit-Change-Id: Iabd7e28b8d5f11f25a000dc4c9ab65895056b572
Gerrit-Change-Number: 21409
Gerrit-PatchSet: 1
Gerrit-Owner: Wenzhe Zhou 
Gerrit-Reviewer: Abhishek Rawat 
Gerrit-Reviewer: Anonymous Coward 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Reviewer: Wenzhe Zhou 
Gerrit-Comment-Date: Tue, 07 May 2024 19:31:01 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13018: Fix test tpcds q80a for JDBC table

2024-05-07 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21409 )

Change subject: IMPALA-13018: Fix test_tpcds_q80a for JDBC table
..


Patch Set 1:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/16118/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
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: comment
Gerrit-Change-Id: Iabd7e28b8d5f11f25a000dc4c9ab65895056b572
Gerrit-Change-Number: 21409
Gerrit-PatchSet: 1
Gerrit-Owner: Wenzhe Zhou 
Gerrit-Reviewer: Abhishek Rawat 
Gerrit-Reviewer: Anonymous Coward 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Comment-Date: Tue, 07 May 2024 19:22:51 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-13018: Fix test tpcds q80a for JDBC table

2024-05-07 Thread Riza Suminto (Code Review)
Riza Suminto has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/21409 )

Change subject: IMPALA-13018: Fix test_tpcds_q80a for JDBC table
..


Patch Set 1: Code-Review+1

(1 comment)

http://gerrit.cloudera.org:8080/#/c/21409/1/fe/src/main/java/org/apache/impala/planner/DataSourceScanNode.java
File fe/src/main/java/org/apache/impala/planner/DataSourceScanNode.java:

http://gerrit.cloudera.org:8080/#/c/21409/1/fe/src/main/java/org/apache/impala/planner/DataSourceScanNode.java@300
PS1, Line 300: castExpr.getType().isDateOrTimeType()
nit: Just want to double check, is CastExpr OK for types other than 
Date/Timestamp? Or should it be avoided entirely regardless of expression type?



--
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: comment
Gerrit-Change-Id: Iabd7e28b8d5f11f25a000dc4c9ab65895056b572
Gerrit-Change-Number: 21409
Gerrit-PatchSet: 1
Gerrit-Owner: Wenzhe Zhou 
Gerrit-Reviewer: Abhishek Rawat 
Gerrit-Reviewer: Anonymous Coward 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Riza Suminto 
Gerrit-Comment-Date: Tue, 07 May 2024 19:12:11 +
Gerrit-HasComments: Yes


[Impala-ASF-CR] IMPALA-13018: Fix test tpcds q80a for JDBC table

2024-05-07 Thread Wenzhe Zhou (Code Review)
Wenzhe Zhou has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/21409


Change subject: IMPALA-13018: Fix test_tpcds_q80a for JDBC table
..

IMPALA-13018: Fix test_tpcds_q80a for JDBC table

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 not adding such conjuncts to
offered predicate list for JDBC table.

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, 18 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/09/21409/1
--
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: newchange
Gerrit-Change-Id: Iabd7e28b8d5f11f25a000dc4c9ab65895056b572
Gerrit-Change-Number: 21409
Gerrit-PatchSet: 1
Gerrit-Owner: Wenzhe Zhou 
Gerrit-Reviewer: Abhishek Rawat 
Gerrit-Reviewer: Anonymous Coward