**Use case**

This works:

```
SELECT * FROM hits_100m_obfuscated INTO OUTFILE 'hits.csv' FORMAT CSV
```

But I want this:

```
SELECT * FROM hits_100m_obfuscated INTO OUTFILE 'hits.csv'
```

**Describe the solution you'd like**

Every format can register file extension(s) in format factory.
If format is not specified explicitly, we can detect it automatically by file extension.
It should work for compressed files `hits.csv.gz` as well.

The following extensions should be supported at least:
csv, tsv, parquet, orc, native, json, ndjson, xml, md, avro

**Addition details**

Let's also support omitting the format argument for `file`, `url`, `s3`, `hdfs` table functions. 
{
            /// The following query will use data from input
            //      "INSERT INTO data FORMAT TSV\n " < data.csv
            //  And may be pretty hard to debug, so add information about data source to make it easier.
            e.addMessage("data for INSERT was parsed from query"
            throw;
        }
        // Remember where the data ended. We use this info later to determine
        // where the next query begins.
         parsed_insert_query->data + data_in.count(
    }
    else if (!is_interactive)
    {
        if (need_render_progress)
        {
            /// Add callback to track reading from fd.
            std_in.setProgressCallback(global_context
        }
        /// Send data read from stdin.
        try
        {
            sendDataFrom(std_in, sample, columns_description_for_query, parsed_query
        }
        catch (Exception & e)
        {
            e.addMessage("data for INSERT was parsed from stdin"
            throw;
        }
    }
    else