This is an automated email from the ASF dual-hosted git repository.
csy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/auron.git
The following commit(s) were added to refs/heads/master by this push:
new bb58c2ed [AURON #1776] Implement native support for EqualNullSafe
expression (#1777)
bb58c2ed is described below
commit bb58c2edf3e58efdf795f39359c32a677aaddca4
Author: Thomas <[email protected]>
AuthorDate: Wed Dec 24 11:20:02 2025 +0800
[AURON #1776] Implement native support for EqualNullSafe expression (#1777)
# Which issue does this PR close?
Closes #1776
# Rationale for this change
# What changes are included in this PR?
# Are there any user-facing changes?
# How was this patch tested?
---
.../org/apache/auron/AuronExpressionSuite.scala | 34 ++++++++++++++++++++++
.../apache/spark/sql/auron/NativeConverters.scala | 1 +
2 files changed, 35 insertions(+)
diff --git
a/spark-extension-shims-spark/src/test/scala/org/apache/auron/AuronExpressionSuite.scala
b/spark-extension-shims-spark/src/test/scala/org/apache/auron/AuronExpressionSuite.scala
new file mode 100644
index 00000000..4bfc4f28
--- /dev/null
+++
b/spark-extension-shims-spark/src/test/scala/org/apache/auron/AuronExpressionSuite.scala
@@ -0,0 +1,34 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.auron
+
+import org.apache.spark.sql.AuronQueryTest
+
+class AuronExpressionSuite extends AuronQueryTest with BaseAuronSQLSuite {
+
+ test("EqualNullSafe") {
+ withTable("t1") {
+ sql("CREATE TABLE t1(id INT, flag BOOLEAN) USING parquet")
+ sql("INSERT INTO t1 VALUES (1, true), (2, false), (3, null), (null,
true)")
+
+ checkSparkAnswerAndOperator(
+ "SELECT id <=> 1, id <=> null, flag <=> true, flag <=> null FROM t1
WHERE flag <=> true")
+ checkSparkAnswerAndOperator(
+ "SELECT id <=> 2, id <=> null, flag <=> false, flag <=> null FROM t1
WHERE NOT flag <=> true")
+ }
+ }
+}
diff --git
a/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala
b/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala
index 2d711012..b137aea8 100644
---
a/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala
+++
b/spark-extension/src/main/scala/org/apache/spark/sql/auron/NativeConverters.scala
@@ -556,6 +556,7 @@ object NativeConverters extends Logging {
case LessThan(lhs, rhs) => buildBinaryExprNode(lhs, rhs, "Lt")
case GreaterThanOrEqual(lhs, rhs) => buildBinaryExprNode(lhs, rhs,
"GtEq")
case LessThanOrEqual(lhs, rhs) => buildBinaryExprNode(lhs, rhs, "LtEq")
+ case EqualNullSafe(lhs, rhs) => buildBinaryExprNode(lhs, rhs,
"IsNotDistinctFrom")
case e: Add if !e.dataType.isInstanceOf[DecimalType] ||
decimalArithOpEnabled =>
val lhs = e.left