Github user liancheng commented on the pull request:

    https://github.com/apache/spark/pull/13270#issuecomment-221739839
  
    @xwu0226 For your [last comment][1] in your PR, I also realized that we are 
not really using `CatalogTable.storage.locationUri` for data source tables 
while doing this PR.
    
    This means we can set an arbitrary location URI to that field as long as 
this location:
    
    1. is either an existing directory, or
    1. a non-existing location, but can definitely be created as a new 
directory successfully by Hive
    
    This PR takes the 2nd approach. Namely make a temporary directory and 
remove it later. The reason is that, I think it can be dangerous to set 
existing directories as location URI. I was afraid of the fact that Hive may 
try to delete that directory because of bugs in either Hive side or Spark side. 
Actually I tried to set `/` (which definitely exists) as location URI when 
doing this PR, and Hive tries to delete my root directory during unit test 
execution... (But that was probably caused my own bugs though.)
    
    [1]: https://github.com/apache/spark/pull/13120#discussion_r64126341



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to