**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. 
{
        // Just a keep-alive update.
        return;
    }
    if (output_format)
        output_format->onProgress(value
    if (need_render_progress)
        progress_indication.writeProgress(
}
void ClientBase::onEndOfStream()
{
    progress_indication.clearProgressOutput(
    if (output_format)
        output_format->finalize(
    resetOutput(
    if (is_interactive && !written_first_block)
    {
        progress_indication.clearProgressOutput(
        std::cout << "Ok." << std::endl;
    }
}
void ClientBase::onProfileEvents(Block & block)
{
    const auto rows = block.rows(
    if (rows == 0)
        return;
    if (server_revision >= DBMS_MIN_PROTOCOL_VERSION_WITH_INCREMENTAL_PROFILE_EVENTS)
    {
        const auto & array_thread_id = typeid_cast<const ColumnUInt64 &>(*block.getByName("thread_id").column).getData(
        const auto & names = typeid_cast<const ColumnString &>(*block.getByName("name").column