yaooqinn opened a new 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
 
 
   ### What changes were proposed in this pull request?
   
   TableCatalog reserves some properties, e,g `provider`, `location` for 
internal usage. Some of them are static once create, some of them need specific 
syntax to modify. Instead of using `OPTIONS (k='v')` or TBLPROPERTIES (k='v'), 
if k is a reserved TableCatalog property, we should use its specific syntax to 
add/modify/delete it. e.g. `provider` is a reserved property, we should use the 
`USING` clause to specify it, and should not allow `ALTER TABLE ... UNSET 
TBLPROPERTIES('provider')` to delete it. Also, there are two paths for v1/v2 
catalog tables to resolve these properties, e.g. the v1 session catalog tables 
will only use the `USING` clause to decide `provider` but v2 tables will also 
lookup OPTION/TBLPROPERTIES(although there is a bug prohibit it).
   
   Additionally, 'path' is not reserved but holds special meaning for 
`LOCATION` and it is used in `CREATE/REPLACE TABLE`'s `OPTIONS` sub-clause. Now 
for the session catalog tables, the `path` is case-insensitive, but for the 
non-session catalog tables, it is case-sensitive, we should make it both case 
insensitive for disambiguation.
   
   ### Why are the changes needed?
   prevent reserved properties from being modified unexpectedly
   unify the property resolution for v1/v2.
   fix some bug.
   
   ### Does this PR introduce any user-facing change?
   
   yes, reserved properties are not able to use in OPTIONS/TBLPROPETIES
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some 
test cases that check the changes thoroughly including negative and positive 
cases if possible.
   If it was tested in a way different from regular unit tests, please clarify 
how you tested step by step, ideally copy and paste-able, so that other 
reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why 
it was difficult to add.
   -->
   
   add ut

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