This is an automated email from the ASF dual-hosted git repository.

zykkk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 60b6e56692d [fix](test) fix clickhouse jdbc catalog func with cast 
push down case (#43348)
60b6e56692d is described below

commit 60b6e56692dfa77f20e4b9feec554a56ed02782a
Author: zy-kkk <zhongy...@gmail.com>
AuthorDate: Thu Nov 7 17:05:00 2024 +0800

    [fix](test) fix clickhouse jdbc catalog func with cast push down case 
(#43348)
    
    When a predicate involves multiple nested functions, there will be some 
implicit type casts, so it cannot be pushed down. We need to set 
`enable_jdbc_cast_predicate_push_down` to true to push down similar predicates.
---
 .../suites/external_table_p0/jdbc/test_clickhouse_jdbc_catalog.groovy   | 2 ++
 1 file changed, 2 insertions(+)

diff --git 
a/regression-test/suites/external_table_p0/jdbc/test_clickhouse_jdbc_catalog.groovy
 
b/regression-test/suites/external_table_p0/jdbc/test_clickhouse_jdbc_catalog.groovy
index 65a55c70f15..fba50c3341e 100644
--- 
a/regression-test/suites/external_table_p0/jdbc/test_clickhouse_jdbc_catalog.groovy
+++ 
b/regression-test/suites/external_table_p0/jdbc/test_clickhouse_jdbc_catalog.groovy
@@ -88,10 +88,12 @@ suite("test_clickhouse_jdbc_catalog", 
"p0,external,clickhouse,external_docker,ex
             contains """QUERY: SELECT "id", "ts" FROM "doris_test"."ts"""
         }
         order_qt_func_push2 """select * from ts where ts <= 
unix_timestamp(from_unixtime(ts,'yyyyMMdd'));"""
+        sql "set enable_jdbc_cast_predicate_push_down = true;"
         explain {
             sql("select * from ts where ts <= 
unix_timestamp(from_unixtime(ts,'yyyy-MM-dd'));")
             contains """QUERY: SELECT "id", "ts" FROM "doris_test"."ts" WHERE 
(("ts" <= toUnixTimestamp(FROM_UNIXTIME("ts", '%Y-%m-%d'))))"""
         }
+        sql "set enable_jdbc_cast_predicate_push_down = false;"
 
         order_qt_dt_with_tz """ select * from dt_with_tz order by id; """
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to