alamb opened a new issue, #2605:
URL: https://github.com/apache/arrow-datafusion/issues/2605

   **Is your feature request related to a problem or challenge? Please describe 
what you are trying to do.**
   DataFusion already supports `CREATE TABLE AS SELECT`
   
   When working with tables it is nice to be able to replace them when they 
already exist
   
   **Describe the solution you'd like**
   
   I would like the following SQL to run rather than produce an error:
   
   ```sql
   ❯ CREATE TABLE valuetable AS VALUES(1,'HELLO'),(12,'DATAFUSION');
   +---------+------------+
   | column1 | column2    |
   +---------+------------+
   | 1       | HELLO      |
   | 12      | DATAFUSION |
   +---------+------------+
   2 rows in set. Query took 0.016 seconds.
   ❯ CREATE OR REPLACE TABLE valuetable AS VALUES(1,'HELLO THERE');
   Execution("Table '\"valuetable\"' already exists")
   ```
   
   The result should be that `valuetable` now contains a single row 👍 
   ```
   +---------+------------+
   | column1 | column2    |
   +---------+------------+
   | 1       | HELLO THERE      |
   ```
   
   
   


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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to