cloud-fan commented on a change in pull request #26806: [SPARK-30183][SQL] 
Disallow to specify reserved properties in CREATE NAMESPACE syntax
URL: https://github.com/apache/spark/pull/26806#discussion_r363645019
 
 

 ##########
 File path: docs/sql-migration-guide.md
 ##########
 @@ -264,6 +264,8 @@ license: |
 
   - Since Spark 3.0, the function `percentile_approx` and its alias 
`approx_percentile` only accept integral value with range in `[1, 2147483647]` 
as its 3rd argument `accuracy`, fractional and string types are disallowed, 
e.g. `percentile_approx(10.0, 0.2, 1.8D)` will cause `AnalysisException`. In 
Spark version 2.4 and earlier, if `accuracy` is fractional or string value, it 
will be coerced to an int value, `percentile_approx(10.0, 0.2, 1.8D)` is 
operated as `percentile_approx(10.0, 0.2, 1)` which results in `10.0`.
 
+  - Since Spark 3.0, the words `location` and `comment` become reserved 
database properties, it will fail with `ParseException` if we use them as 
members of `DBPROTERTIES` in `CREATE DATABASE` and `ALTER DATABASE ... SET 
PROPERTIES(...)`. We need their specific clauses to specify them, e.g. `CREATE 
DATABASE test COMMENT 'any comment' LOCATION 'some path'`. We can set 
`spark.sql.legacy.property.nonReserved` to `true` to ignore the 
`ParseException`, but notice that in this case, these properties will be 
ignored too, e.g `SET DBPROTERTIES('location'='/tmp')` will affect nothing. In 
Spark version 2.4 and earlier, these properties are neither reserved nor have 
side effects, e.g. `SET DBPROTERTIES('location'='/tmp')` will not change the 
location of the database but only create a headless property just like 
`'a'='b'`.
 
 Review comment:
   `notice that in this case, these properties will be ignored too ...` We 
don't need to highlight it as it's the same with 2.4

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to