slfan1989 commented on code in PR #1583:
URL: https://github.com/apache/auron/pull/1583#discussion_r2484243013


##########
spark-extension-shims-spark/src/test/scala/org/apache/spark/sql/auron/AuronFunctionSuite.scala:
##########
@@ -319,4 +319,21 @@ class AuronFunctionSuite
     val row = df.collect().head
     assert(row.isNullAt(0) && row.isNullAt(1) && row.isNullAt(2))
   }
+
+  test("test function least") {
+    withTable("t1") {
+      sql(
+        "create table t1 using parquet as select 1" +
+          " as first, 2 as second, 3 as third")
+      val functions =
+        """
+          |select
+          |  least(first, second, third)
+          |from t1
+                        """.stripMargin
+

Review Comment:
   https://spark.apache.org/docs/latest/api/sql/index.html#least
   
   ```
   least(expr, ...) - Returns the least value of all parameters, skipping null 
values.
   ```
   
   In Spark, least skips NULL values and only returns NULL when all arguments 
are NULL. At a minimum, add the following cases:
   
   ```
   SELECT least(10, 9, 2, 4, 3, NULL) → 2
   ```



##########
native-engine/auron-serde/proto/auron.proto:
##########
@@ -267,6 +267,8 @@ enum ScalarFunction {
   Factorial=65;
   Hex=66;
   Power=67;
+

Review Comment:
   Avoid



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

Reply via email to