tshauck commented on code in PR #342:
URL: https://github.com/apache/datafusion-comet/pull/342#discussion_r1593238627
##########
spark/src/test/scala/org/apache/comet/CometExpressionSuite.scala:
##########
@@ -1024,7 +1024,25 @@ class CometExpressionSuite extends CometTestBase with
AdaptiveSparkPlanHelper {
}
}
}
+ test("unhex") {
+ val table = "unhex_table"
+ withTable(table) {
+ sql(s"create table $table(col string) using parquet")
+
+ sql(s"""INSERT INTO $table VALUES
+ |('537061726B2053514C'),
+ |('737472696E67'),
+ |('\0'),
+ |(''),
+ |('###'),
+ |('G123'),
+ |('hello'),
+ |('A1B'),
+ |('0A1B')""".stripMargin)
+ checkSparkAnswerAndOperator(s"SELECT unhex(col) FROM $table")
Review Comment:
Looking at the spark repo a bit more, it looks like there was a bug in the
[3.2
implementation](https://github.com/apache/spark/commit/276abe3c3311300cffc6570b66f3977ea8172ff0)
that was fixed in subsequent versions.
How should I handle this? Like should I write a native implementation of the
erroneous code in order to be faithful to the spark, or have it be correct if
different?
--
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]