CREATE EXTERNAL TABLE t STORED AS CSV LOCATION '~/files/foo.csv'; gives an error if the given file does not exist. When we are trying to create a new file and then insert some values into it, we are forced to create the file externally.
I wonder how it sounds if create external table's create the file indeed if it doesn't exist. If it seems like a useful behavior, then there will be a few more questions like
- at what instance exactly the file is generated (during table provider generation, or during scan, or during the next select or insert into query?)
- how are the stores other than local file system treated?