dongjoon-hyun commented on a change in pull request #27489: [SPARK-30703][SQL][DOCS] Add a document for the ANSI mode URL: https://github.com/apache/spark/pull/27489#discussion_r376739104
########## File path: docs/sql-ref-ansi-compliance.md ########## @@ -19,6 +19,87 @@ license: | limitations under the License. --- +Spark SQL has two options to comply with the SQL standard: `spark.sql.ansi.enabled` and `spark.sql.storeAssignmentPolicy`. +When `spark.sql.ansi.enabled` is set to `true` (`false` by default), Spark SQL follows the standard in basic behaviours (e.g., arithmetic operations, type conversion, and SQL parsing). +Moreover, Spark SQL has an independent option to control implicit casting behaviours when inserting rows in a table. +The casting behaviours are defined as store assignment rules in the standard. +When `spark.sql.storeAssignmentPolicy` is set to `ANSI`, Spark SQL complies with the ANSI store assignment rules and this setting is a default value. Review comment: Shall we summarize as a table like https://spark.apache.org/docs/3.0.0-preview2/configuration.html#application-properties ? That will be more easier to explain and to understand and to maintain(add new conf later or change the default value). For example, the default value of `spark.sql.storeAssignmentPolicy` is not mentioned in this paragraph. ---------------------------------------------------------------- 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]
