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



##########
File path: docs/sql-migration-guide.md
##########
@@ -83,6 +83,8 @@ license: |
 
   - In Spark 3.2, the unit-to-unit interval literals like `INTERVAL '1-1' YEAR 
TO MONTH` are converted to ANSI interval types: `YearMonthIntervalType` or 
`DayTimeIntervalType`. In Spark 3.1 and earlier, such interval literals are 
converted to `CalendarIntervalType`. To restore the behavior before Spark 3.2, 
you can set `spark.sql.legacy.interval.enabled` to `true`.
 
+  - In Spark 3.2, Spark supports `DayTimeIntervalType` and 
`YearMonthIntervalType` as inputs and outputs of `TRANSFORM` clause in Hive 
`SERDE` mode, the behavior is different between Hive `SERDE` mode and `ROW 
FORMAT DELIMITED` mode when this two types are used as inputs. In Hive `SERDE` 
mode, `DayTimeIntervalType` column is converted to `HiveIntervalDayTime`, its 
string format is `[+|-]?d h:m:s.n`, but in `ROW FORMAT DELIMITED` mode the 
format is `INTERVAL [-|+]?'[-|+]?d h:m:s.n' DAY TO TIME`. In Hive `SERDE` mode, 
`YearMonthIntervalType` column is converted to `HiveIntervalYearMonth`, its 
string format is `[+|-]?y-m`, but in `ROW FORMAT DELIMITED` mode the format is 
`INTERVAL [-|+]?'[-|+]?y-m' YEAR TO MONTH`.

Review comment:
       Sorry, one more iteration:
   this two types -> these two types




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