You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "wangyum (via GitHub)" <gi...@apache.org> on 2023/04/12 23:36:37 UTC

[GitHub] [spark] wangyum opened a new pull request, #40763: [SPARK-43114][SQL][TESTS] Add interval types to TypeCoercionSuite

wangyum opened a new pull request, #40763:
URL: https://github.com/apache/spark/pull/40763

   ### What changes were proposed in this pull request?
   
   This PR adds `DayTimeIntervalType` and `YearMonthIntervalType` to `TypeCoercionSuite`.
   
   ### Why are the changes needed?
   
   Increase test coverage.
   
   ### Does this PR introduce _any_ user-facing change?
   
   No.
   
   ### How was this patch tested?
   
   N/A.


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


[GitHub] [spark] HyukjinKwon closed pull request #40763: [SPARK-43114][SQL][TESTS] Add interval types to TypeCoercionSuite

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #40763: [SPARK-43114][SQL][TESTS] Add interval types to TypeCoercionSuite
URL: https://github.com/apache/spark/pull/40763


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


[GitHub] [spark] amaliujia commented on a diff in pull request #40763: [SPARK-43114][SQL][TESTS] Add interval types to TypeCoercionSuite

Posted by "amaliujia (via GitHub)" <gi...@apache.org>.
amaliujia commented on code in PR #40763:
URL: https://github.com/apache/spark/pull/40763#discussion_r1164796991


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala:
##########
@@ -1763,6 +1763,8 @@ object TypeCoercionSuite {
     Seq(DoubleType, FloatType, DecimalType.SYSTEM_DEFAULT, DecimalType(10, 2))
   val numericTypes: Seq[DataType] = integralTypes ++ fractionalTypes
   val datetimeTypes: Seq[DataType] = Seq(DateType, TimestampType, TimestampNTZType)
+  val intervalTypes: Seq[DataType] = Seq(CalendarIntervalType, DayTimeIntervalType.DEFAULT,
+    YearMonthIntervalType.DEFAULT)

Review Comment:
   nit: I am thinking you should use `defaultConcreteType` to access the DEFAULT instance: https://github.com/apache/spark/blob/76bd695084ca8564bdca258b469ece54d3a55ab0/sql/catalyst/src/main/scala/org/apache/spark/sql/types/DayTimeIntervalType.scala#L106



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


[GitHub] [spark] HyukjinKwon commented on pull request #40763: [SPARK-43114][SQL][TESTS] Add interval types to TypeCoercionSuite

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #40763:
URL: https://github.com/apache/spark/pull/40763#issuecomment-1506647802

   Merged to master.


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


[GitHub] [spark] amaliujia commented on a diff in pull request #40763: [SPARK-43114][SQL][TESTS] Add interval types to TypeCoercionSuite

Posted by "amaliujia (via GitHub)" <gi...@apache.org>.
amaliujia commented on code in PR #40763:
URL: https://github.com/apache/spark/pull/40763#discussion_r1164796991


##########
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/analysis/TypeCoercionSuite.scala:
##########
@@ -1763,6 +1763,8 @@ object TypeCoercionSuite {
     Seq(DoubleType, FloatType, DecimalType.SYSTEM_DEFAULT, DecimalType(10, 2))
   val numericTypes: Seq[DataType] = integralTypes ++ fractionalTypes
   val datetimeTypes: Seq[DataType] = Seq(DateType, TimestampType, TimestampNTZType)
+  val intervalTypes: Seq[DataType] = Seq(CalendarIntervalType, DayTimeIntervalType.DEFAULT,
+    YearMonthIntervalType.DEFAULT)

Review Comment:
   nit: I am thinking you should use `defaultConcreteType` to access the DEFAULT instance.



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