MaxGekk commented on a change in pull request #32343:
URL: https://github.com/apache/spark/pull/32343#discussion_r620266749
##########
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:
`INTERVAL [-|+]?'[-|+]?d h:m:s.n' DAY TO TIME`
`INTERVAL [-|+]?'[-|+]?y-m' YEAR TO MONTH`
I guess the sign is inside of `''`, and the string literal cannot have `+`.
--
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]