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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to