Github user hvanhovell commented on the pull request: https://github.com/apache/spark/pull/13414 @clockfly the description is getting there. IIUC the problem we are solving is the following: `CREATE TEMPORARY TABLE ... USING ...` allows us to create a temporary (session bound) connection to a (potentially) permanent data store. When the session finishes, the table **definition** (connection) is dropped, but the **data** is not. This is more-or-less the behavior you expect with a `TEMPORARY EXTERNAL` table (do we have those?), and this actually violates the common definition of a temporary table in which both the table definition and the data are session bound. Using `CREATE TEMPORARY VIEW ... USING ...` accomplishes two things: - It doesn't make assumption about the underlying data (it can both be permanent or session bound). - It doesn't allow user to write to the datasource. I do have a couple of issues with this: - Using `CREATE TEMPORARY TABLE ... USING ...` should still be allowed to use if you are using an actual session local temporary table. We could detect these by checking if a schema is defined (the location is also an issue). How do we deal with this use case? - I would support creating a `CREATE TEMPORARY EXTERNAL TABLE ... USING ...` to retain the current behavior. What do you think?
--- 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