JNSimba commented on code in PR #339:
URL: 
https://github.com/apache/doris-spark-connector/pull/339#discussion_r2380746210


##########
spark-doris-connector/spark-doris-connector-it/src/test/java/org/apache/doris/spark/sql/DorisReaderITCase.scala:
##########
@@ -560,4 +561,44 @@ class DorisReaderITCase(readMode: String, flightSqlPort: 
Int) extends AbstractCo
       assert("List([1], [2])".equals(prefixTest.toList.toString()))
     }
   }
+
+  @Test
+  def testExpressionNotPushDown(): Unit = {
+    val sourceInitSql: Array[String] = 
ContainerUtils.parseFileContentSQL("container/ddl/read_filter_pushdown.sql")
+    ContainerUtils.executeSQLStatement(getDorisQueryConnection(DATABASE), LOG, 
sourceInitSql: _*)
+
+    val session = SparkSession.builder().master("local[*]").getOrCreate()
+    try {
+      session.sql(
+        s"""
+           |CREATE TEMPORARY VIEW test_source
+           |USING doris
+           |OPTIONS(
+           | "table.identifier"="${DATABASE + "." + 
TABLE_READ_EXPRESSION_NOTPUSHDOWN}",
+           | "fenodes"="${getFenodes}",
+           | "user"="${getDorisUsername}",
+           | "password"="${getDorisPassword}"
+           |)
+           |""".stripMargin)
+
+      val resultData = session.sql(
+        """
+          |select COALESCE(CAST(A4 AS STRING),'null')
+          |from test_source where COALESCE(CAST(A4 AS STRING),'null') in ('a4')
+          |""".stripMargin)
+
+      println(resultData.collect().toList.toString())
+      assert("List([a4], [a4], [a4], [a4], 
[a4])".equals(resultData.collect().toList.toString()))

Review Comment:
   Can you add another dataframe case?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to