You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/10/30 09:33:50 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #34446: [SPARK-37161][SQL] RowToColumnConverter support AnsiIntervalType

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: 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