You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by ji...@apache.org on 2022/12/15 09:21:54 UTC

[doris-spark-connector] branch master updated: [fix] doris.filter.query is not working where create temp view and query the view (#55)

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

jiafengzheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris-spark-connector.git


The following commit(s) were added to refs/heads/master by this push:
     new 6e81946  [fix] doris.filter.query is not working where create temp view and query the view (#55)
6e81946 is described below

commit 6e819465107809248c07fe92a093c04d7cc49f77
Author: gnehil <ad...@gmail.com>
AuthorDate: Thu Dec 15 17:21:49 2022 +0800

    [fix] doris.filter.query is not working where create temp view and query the view (#55)
---
 .../src/main/scala/org/apache/doris/spark/sql/DorisRelation.scala      | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/spark-doris-connector/src/main/scala/org/apache/doris/spark/sql/DorisRelation.scala b/spark-doris-connector/src/main/scala/org/apache/doris/spark/sql/DorisRelation.scala
index 3e3616d..4c9d348 100644
--- a/spark-doris-connector/src/main/scala/org/apache/doris/spark/sql/DorisRelation.scala
+++ b/spark-doris-connector/src/main/scala/org/apache/doris/spark/sql/DorisRelation.scala
@@ -81,7 +81,8 @@ private[sql] class DorisRelation(
     }
 
     if (filters != null && filters.length > 0) {
-      paramWithScan += (ConfigurationOptions.DORIS_FILTER_QUERY -> filterWhereClause)
+      val dorisFilterQuery = cfg.getProperty(ConfigurationOptions.DORIS_FILTER_QUERY, "1=1")
+      paramWithScan += (ConfigurationOptions.DORIS_FILTER_QUERY -> (dorisFilterQuery + " and " + filterWhereClause))
     }
 
     new ScalaDorisRowRDD(sqlContext.sparkContext, paramWithScan.toMap, lazySchema)


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