MaxGekk commented on code in PR #56889:
URL: https://github.com/apache/spark/pull/56889#discussion_r3497379990
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/aggregate/percentiles.scala:
##########
@@ -75,7 +75,8 @@ abstract class PercentileBase
case _: ArrayType => ArrayType(DoubleType, false)
case _ => DoubleType
}
- Seq(NumericAndAnsiInterval, percentageExpType, IntegralType)
+ Seq(TypeCollection(NumericType, DayTimeIntervalType,
YearMonthIntervalType, AnyTimeType),
Review Comment:
Non-blocking: this re-inlines the three types that `NumericAndAnsiInterval`
already groups (`NumericType, DayTimeIntervalType, YearMonthIntervalType`).
Since `TypeCollection` nests/flattens, you can keep the named abstraction and
just add the new type:
```suggestion
Seq(TypeCollection(NumericAndAnsiInterval, AnyTimeType),
```
That keeps this call site in sync if `NumericAndAnsiInterval` ever changes.
(You'll also keep the existing `import
...TypeCollection.NumericAndAnsiInterval` rather than removing it.)
--
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]