maropu commented on a change in pull request #27909: [SPARK-31151][SQL][DOC] 
Reorganize the migration guide of SQL
URL: https://github.com/apache/spark/pull/27909#discussion_r392561520
 
 

 ##########
 File path: docs/sql-migration-guide.md
 ##########
 @@ -26,92 +26,113 @@ license: |
   - Since Spark 3.1, grouping_id() returns long values. In Spark version 3.0 
and earlier, this function returns int values. To restore the behavior before 
Spark 3.0, you can set `spark.sql.legacy.integerGroupingId` to `true`.
 
 ## Upgrading from Spark SQL 2.4 to 3.0
-  - Since Spark 3.0, when inserting a value into a table column with a 
different data type, the type coercion is performed as per ANSI SQL standard. 
Certain unreasonable type conversions such as converting `string` to `int` and 
`double` to `boolean` are disallowed. A runtime exception will be thrown if the 
value is out-of-range for the data type of the column. In Spark version 2.4 and 
earlier, type conversions during table insertion are allowed as long as they 
are valid `Cast`. When inserting an out-of-range value to a integral field, the 
low-order bits of the value is inserted(the same as Java/Scala numeric type 
casting). For example, if 257 is inserted to a field of byte type, the result 
is 1. The behavior is controlled by the option 
`spark.sql.storeAssignmentPolicy`, with a default value as "ANSI". Setting the 
option as "Legacy" restores the previous behavior.
-
-  - In Spark 3.0, the deprecated methods `SQLContext.createExternalTable` and 
`SparkSession.createExternalTable` have been removed in favor of its 
replacement, `createTable`.
-
-  - In Spark 3.0, the deprecated `HiveContext` class has been removed. Use 
`SparkSession.builder.enableHiveSupport()` instead.
-
-  - Since Spark 3.0, configuration `spark.sql.crossJoin.enabled` become 
internal configuration, and is true by default, so by default spark won't raise 
exception on sql with implicit cross join.
-
-  - In Spark version 2.4 and earlier, SQL queries such as `FROM <table>` or 
`FROM <table> UNION ALL FROM <table>` are supported by accident. In hive-style 
`FROM <table> SELECT <expr>`, the `SELECT` clause is not negligible. Neither 
Hive nor Presto support this syntax. Therefore we will treat these queries as 
invalid since Spark 3.0.
 
-  - Since Spark 3.0, the Dataset and DataFrame API `unionAll` is not 
deprecated any more. It is an alias for `union`.
+### DML
 
 Review comment:
   not DML but DDL?

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


With regards,
Apache Git Services

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

Reply via email to