**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. 
config().setBool("highlight", options["highlight"].as<bool>()
    if (options.count("history_file"))
        config().setString("history_file", options["history_file"].as<std::string>()
    if (options.count("verbose"))
        config().setBool("verbose", true
    if (options.count("interactive"))
        config().setBool("interactive", true
    if (options.count("pager"))
        config().setString("pager", options["pager"].as<std::string>()
    if (options.count("log-level"))
        Poco::Logger::root().setLevel(options["log-level"].as<std::string>()
    if (options.count("server_logs_file"))
        server_logs_file = options["server_logs_file"].as<std::string>(
    query_processing_stage = QueryProcessingStage::fromString(options["stage"].as<std::string>()
    profile_events.print = options.count("print-profile-events"
    profile_events.delay_ms = options["profile-events-delay-ms"].as<UInt64>(
    processOptions(options_description, options, external_tables_arguments
    argsToConfig(common_arguments, config(), 100
    clearPasswordFromCommandLine(argc, argv
    /// Limit on total memory usage
    size_t m().getInt64("max_memory_usage_in_client", 0 /*default value*/
    if (max_client_memor
    {
        total_memory_tracker.setHardLimit(max_client_memory_usage
        total_memory_tracker.setDescription("(total)"
        total_memory_tracker.setMetric(CurrentMetrics::MemoryTracking
    }
}
}