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/04/26 12:31:10 UTC

[GitHub] [spark] MaxGekk commented on a change in pull request #32343: [SPARK-35220][DOCS][FOLLOWUP] DayTimeIntervalType/YearMonthIntervalType show different between Hive SerDe and row format delimited

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



##########
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`, it's 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`, it's string format is `[+|-]?y-m`, but in `ROW FORMAT DELIMITED` mode the format is `INTERVAL [-|+]?'[-|+]?y-m' YEAR TO MONTH`.

Review comment:
       it's string format is `[+|-]?d h:m:s.n` -> its string format is `[+|-]?d h:m:s.n`




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