cloud-fan commented on a change in pull request #27197: [SPARK-30507][SQL] 
TableCalalog reserved properties shoudn't be changed via options or tblpropeties
URL: https://github.com/apache/spark/pull/27197#discussion_r366867414
 
 

 ##########
 File path: docs/sql-migration-guide.md
 ##########
 @@ -264,7 +264,79 @@ 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, `location` and `comment` become reserved database 
properties, Commands will fail if we specify reserved properties in `CREATE 
DATABASE ... WITH DBPROPERTIES` and `ALTER DATABASE ... SET DBPROPERTIES`. 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`, in this case, these properties will be silently removed, 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'`.
+  - Since Spark 3.0, the properties listing below become reserved, commands 
will fail if we specify reserved properties in `CREATE DATABASE ... WITH 
DBPROPERTIES` and `ALTER DATABASE ... SET DBPROPERTIES`. 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`, in this case, these properties will be 
silently removed, 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:
   if we specify reserved properties in places like  \`CREATE DATABASE ... WITH 
DBPROPERTIES\` ...

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