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/03/11 16:43:00 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #31810: [SPARK-34718][SQL] Assign pretty names to YearMonthIntervalType and DayTimeIntervalType

MaxGekk commented on a change in pull request #31810:
URL: https://github.com/apache/spark/pull/31810#discussion_r592521765



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/types/YearMonthIntervalType.scala
##########
@@ -54,6 +54,8 @@ class YearMonthIntervalType private() extends AtomicType {
   override def defaultSize: Int = 4
 
   private[spark] override def asNullable: YearMonthIntervalType = this
+
+  override def typeName: String = "year-month interval"

Review comment:
       1. I haven't found any places in the SQL standard where `year-month` and `day-time` are used without the `interval(s)` word(s).
   2. Actual type name is `INTERVAL`, `year-month` and `day-time` just define (sub-)classes of the type.
   3. Since the `typeName()` method is used in error messages, I do believe we should leave `interval` in type names for readability. 




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

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