aoyuEra commented on PR #300: URL: https://github.com/apache/doris-spark-connector/pull/300#issuecomment-2764937443
```scala @Test def buildCaseWhenTest(): Unit = { val sourceInitSql: Array[String] = ContainerUtils.parseFileContentSQL("container/ddl/read_all_type.sql") ContainerUtils.executeSQLStatement(getDorisQueryConnection(DATABASE), LOG, sourceInitSql: _*) val session = SparkSession.builder().master("local[*]").getOrCreate() session.sql( s""" |CREATE TEMPORARY VIEW test_source |USING doris |OPTIONS( | "table.identifier"="${DATABASE + "." + TABLE_READ_TBL_ALL_TYPES}", | "fenodes"="${getFenodes}", | "user"="${getDorisUsername}", | "password"="${getDorisPassword}", | "doris.read.mode"="${readMode}", | "doris.read.arrow-flight-sql.port"="${flightSqlPort}" |) |""".stripMargin) val resultData = session.sql( """ |select * from ( | select | id, | (case when c5 > 10 then c2 else null end) as cc1, | (case when c4 < 5 then c3 else null end) as cc2 | from test_source where c2 is not null |) where !(cc1 is null and cc2 is null) order by id |""".stripMargin) assert("List([1,127,null], [2,null,-32768], [3,null,0])".equals(resultData.collect().toList.toString())) session.stop() } ``` If we want to add this example to the `org.apache.dors.spark.read.expression.V2ExpressionBuilderTest` case, we need to introduce a large number of classes from Spark doris connector it, which may not be suitable for compilation and running. What should we do if we need to make adjustments here? @gnehil -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org