Copilot commented on code in PR #13214:
URL: https://github.com/apache/gluten/pull/13214#discussion_r4255170971
##########
backends-velox/src/test/scala/org/apache/gluten/functions/ScalarFunctionsValidateSuite.scala:
##########
@@ -197,6 +197,46 @@ class ScalarFunctionsValidateSuite extends
FunctionsValidateSuite {
}
}
+ test("shiftrightunsigned") {
+ withTempPath {
+ path =>
+ withTempView("shift_input") {
+ Seq[(Integer, java.lang.Long, Integer)](
+ (8, 8L, 1),
+ (-1, -1L, 1),
+ (Int.MinValue, Long.MinValue, 1),
+ (Int.MinValue, Long.MinValue, 31),
+ (-1, -1L, 32),
+ (-1, -1L, 33),
+ (-1, -1L, 63),
+ (-1, -1L, 64),
+ (-1, -1L, 65),
+ (-1, -1L, -1),
+ (Int.MinValue, Long.MinValue, Int.MaxValue),
+ (null, null, 1),
+ (1, 1L, null)
+ )
+ .toDF("int_value", "long_value", "shift")
+ .write
+ .parquet(path.getCanonicalPath)
+
+
spark.read.parquet(path.getCanonicalPath).createOrReplaceTempView("shift_input")
+
+ runQueryAndCompare(
+ """
+ |SELECT
+ | shiftrightunsigned(int_value, shift),
+ | int_value >>> shift,
+ | shiftrightunsigned(long_value, shift),
+ | long_value >>> shift
+ |FROM shift_input
+ |""".stripMargin) {
+ checkGlutenPlan[ProjectExecTransformer]
+ }
Review Comment:
The `>>>` SQL operator is only available from Spark 4.0 (the function-doc
registry declares it with `Some("4.0.0")`), but this suite runs for older Spark
profiles too. Because the operator is in the same query as the function form,
Spark 3.x will fail parsing the entire test. Keep the function query
version-independent and execute the operator query only on Spark 4.0+.
##########
docs/velox-backend-scalar-function-support.md:
##########
@@ -42,14 +42,14 @@ The status applies to `spark.sql.ansi.enabled=false`. When
ANSI mode is enabled,
| & | BitwiseAnd | S | |
| << | ShiftLeft | S | |
| >> | ShiftRight | S | |
-| >>> | ShiftRightUnsigned | | |
+| >>> | ShiftRightUnsigned | S | |
Review Comment:
These two statuses were updated without regenerating the document summary.
The generator counts both rows as one previously unsupported function because
they share `ShiftRightUnsigned`, so removing that unsupported entry increases
the header from 261 to 262 fully supported functions. Please update the summary
at line 3 (ideally by rerunning the generator) so it does not under-report
support.
--
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]