sunchao commented on code in PR #5835:
URL: https://github.com/apache/datafusion-comet/pull/5835#discussion_r4433047954
##########
spark/src/test/scala/org/apache/comet/CometHashExpressionSuite.scala:
##########
@@ -113,6 +115,77 @@ class CometHashExpressionSuite extends CometTestBase with
AdaptiveSparkPlanHelpe
}
}
+ test("hash - TimeType falls back to Spark") {
+ assume(isSpark41Plus, "TimeType requires Spark 4.1+")
+ withSQLConf("spark.sql.timeType.enabled" -> "true") {
+ withTable("t") {
+ sql("CREATE TABLE t(c STRING) USING parquet")
+ sql("INSERT INTO t VALUES ('12:34:56'), ('00:00:00'), (null)")
+ checkSparkAnswerAndFallbackReasons(
+ "SELECT hash(to_time(c)) FROM t",
+ Set("`TimeType` is not supported"))
+ checkSparkAnswerAndFallbackReasons(
+ "SELECT xxhash64(to_time(c)) FROM t",
+ Set("`TimeType` is not supported"))
+ }
+ }
+ }
+
+ Seq("STRING", "BINARY").foreach { payloadType =>
+ test(s"sha2 - non-foldable numBits stays native with $payloadType
payload") {
Review Comment:
Could these table-driven SHA-2 cases live with the existing hash SQL
fixtures? `ConfigMatrix` can vary the dispatcher setting, and
`expect_native(sha2)` checks routing while comparing results with Spark. That
covers the STRING/BINARY payloads and per-row bit widths without the nested
Scala loops and a second implementation of the routing assertion.
--
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]