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

 ##########
 File path: docs/sql-migration-guide.md
 ##########
 @@ -264,7 +264,93 @@ 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'`.
+    <table class="table">
+        <tr>
+          <th>
+            <b>Property(case sensitive)</b>
+          </th>
+          <th>
+            <b>Database Reserved</b>
+          </th>
+          <th>
+            <b>Table Reserved</b>
+          </th>
+          <th>
+            <b>Remarks</b>
+          </th>
+        </tr>
+        <tr>
+          <td>
+            provider
+          </td>
+          <td>
+            no
+          </td>
+          <td>
+            yes
+          </td>
+          <td>
+            For tables, please use the USING clause to specify it.
 
 Review comment:
   use `REPLACE TABLE`,  if we want to change `provider` for the v1 tables is 
the same as before.
   for the v2 tables, we are able to change it via `SET TBLPROPERTIES ` before, 
but now only `REPLACE TABLE` can work as v1s
   
   
   

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