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


##########
spark-doris-connector/spark-doris-connector-spark-3.3/src/main/scala/org/apache/doris/spark/read/expression/V2ExpressionBuilder.scala:
##########
@@ -72,7 +86,8 @@ class V2ExpressionBuilder(inValueLengthLimit: Int) {
               fragment.append(" END")
 
               fragment.mkString
-            case _ => null
+            case "COALESCE" => 
s"COALESCE(${e.children().map(build).mkString(",")})"
+            case _ => throw new IllegalArgumentException(s"Unsupported 
expression: ${e.name()}")

Review Comment:
   if it can not be pushed forward,it shoud be filter ,for example ,the 
function has been changed from build() to buildOpt,if push forward case an 
error, the build() function shoud throw an exception ,and catched in buildOpt, 
continuely, the buildOpt should return an NONE,so the expression should be 
filtered.



##########
spark-doris-connector/spark-doris-connector-spark-3.3/src/main/scala/org/apache/doris/spark/read/expression/V2ExpressionBuilder.scala:
##########
@@ -72,7 +86,8 @@ class V2ExpressionBuilder(inValueLengthLimit: Int) {
               fragment.append(" END")
 
               fragment.mkString
-            case _ => null
+            case "COALESCE" => 
s"COALESCE(${e.children().map(build).mkString(",")})"
+            case _ => throw new IllegalArgumentException(s"Unsupported 
expression: ${e.name()}")

Review Comment:
   <img width="1553" height="266" alt="image" 
src="https://github.com/user-attachments/assets/993b0711-151e-40f6-b1fa-2a8902de0102";
 />
   



-- 
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