You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "peter-toth (via GitHub)" <gi...@apache.org> on 2026/03/18 17:12:16 UTC
Re: [PR] [SPARK-56046][SQL] Typed SPJ partition key `Reducer`s [spark]
peter-toth commented on code in PR #54884:
URL: https://github.com/apache/spark/pull/54884#discussion_r2954992455
##########
sql/core/src/test/scala/org/apache/spark/sql/connector/catalog/functions/transformFunctions.scala:
##########
@@ -40,42 +40,137 @@ object UnboundYearsFunction extends UnboundFunction {
override def name(): String = "years"
}
-object YearsFunction extends ScalarFunction[Long] {
+object YearsFunction extends ScalarFunction[Int] with ReducibleFunction[Int, Int] {
override def inputTypes(): Array[DataType] = Array(TimestampType)
- override def resultType(): DataType = LongType
+ override def resultType(): DataType = IntegerType
Review Comment:
I changed the test `years` transform to use `IntegerType` and the test `days` transform to use `DateType` as those 2 differ but have the same `PhysicalIntegerType` physical type, which the new tests require.
--
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: reviews-unsubscribe@spark.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org