MaxGekk commented on a change in pull request #34446:
URL: https://github.com/apache/spark/pull/34446#discussion_r739631666
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/vectorized/ColumnarBatchSuite.scala
##########
@@ -1688,6 +1688,45 @@ class ColumnarBatchSuite extends SparkFunSuite {
}
}
+ test("RowToColumnConverter for AnsiIntervalType") {
Review comment:
Add JIRA ID:
```suggestion
test("SPARK-37161: RowToColumnConverter for AnsiIntervalType") {
```
##########
File path: sql/core/src/main/scala/org/apache/spark/sql/execution/Columnar.scala
##########
@@ -260,9 +260,9 @@ private object RowToColumnConverter {
case BooleanType => BooleanConverter
case ByteType => ByteConverter
case ShortType => ShortConverter
- case IntegerType | DateType => IntConverter
+ case IntegerType | DateType | YearMonthIntervalType(_, _) => IntConverter
Review comment:
Please, use _: YearMonthIntervalType. In this ways, your code won't
depend on the number of parameters. Also, see
https://github.com/databricks/scala-style-guide#pattern-matching :
_"If the only goal is to match on the type of the object, do NOT expand
fully all the arguments, as it makes refactoring more difficult and the code
more error prone."_
--
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]