cloud-fan commented on a change in pull request #32949:
URL: https://github.com/apache/spark/pull/32949#discussion_r665573496



##########
File path: docs/sql-migration-guide.md
##########
@@ -83,7 +83,9 @@ license: |
 
   - In Spark 3.2, `TRANSFORM` operator can support 
`ArrayType/MapType/StructType` without Hive SerDe, in this mode, we use 
`StructsToJosn` to convert `ArrayType/MapType/StructType` column to `STRING` 
and use `JsonToStructs` to parse `STRING` to `ArrayType/MapType/StructType`. In 
Spark 3.1, Spark just support case `ArrayType/MapType/StructType` column as 
`STRING` but can't support parse `STRING` to `ArrayType/MapType/StructType` 
output columns.
 
-  - 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, the unit-to-unit interval literals like `INTERVAL '1-1' YEAR 
TO MONTH` and the unit list interval literals like `INTERVAL '3' DAYS '1' HOUR` 
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, the unit list interval literals support year-month units 
(YEAR and MONTH), day-time units (DAY, HOUR, MINUTE and SECOND) and the others 
(WEEK, MILLISECOND and MICROSECOND). Within an interval literal, multiple units 
are allowed to be listed as long as all of the units belong to the same 
category like `5 YEARS 8 MONTHS` or `1 DAY 2 MINUTE`. In Spark 3.1 and earlier, 
any units are allowed to be listed within a literal. To restore the behavior 
before Spark 3.2, you can set `spark.sql.legacy.interval.enabled` to `true`.

Review comment:
       they are not, but they are valid day-time fields.




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

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