**Describe the situation**

Currently it does not:

```
milovidov-desktop :) EXPLAIN SYNTAX SELECT sum(cityHash64(*)) AS x FROM test.hits WHERE URLDomain LIKE '%metrika%'

EXPLAIN SYNTAX
SELECT sum(cityHash64(*)) AS x
FROM test.hits
WHERE URLDomain LIKE '%metrika%'

Query id: a752ed76-a71c-4e26-96c1-1b081abfc539

┌─explain────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ SELECT sum(cityHash64(WatchID, JavaEnable, Title, GoodEvent, EventTime, EventDate, CounterID, ClientIP, ClientIP6, RegionID, UserID, CounterClass, OS, UserAgent, URL, Referer, URLDomain, RefererDomain, Refresh, IsRobot, RefererCategories, URLCategories, URLRegions, RefererRegions, ResolutionWidth, ResolutionHeight, ResolutionDepth, FlashMajor, FlashMinor, FlashMinor2, NetMajor, NetMinor, UserAgentMajor, UserAgentMinor, CookieEnable, JavascriptEnable, IsMobile, MobilePhone, MobilePhoneModel, Params, IPNetworkID, TraficSourceID, SearchEngineID, SearchPhrase, AdvEngineID, IsArtifical, WindowClientWidth, WindowClientHeight, ClientTimeZone, ClientEventTime, SilverlightVersion1, SilverlightVersion2, SilverlightVersion3, SilverlightVersion4, PageCharset, CodeVersion, IsLink, IsDownload, IsNotBounce, FUniqID, HID, IsOldCounter, IsEvent, IsParameter, DontCountHits, WithHash, HitColor, UTCEventTime, Age, Sex, Income, Interests, Robotness, GeneralInterests, RemoteIP, RemoteIP6, WindowName, OpenerName, HistoryLength, BrowserLanguage, BrowserCountry, SocialNetwork, SocialAction, HTTPError, SendTiming, DNSTiming, ConnectTiming, ResponseStartTiming, ResponseEndTiming, FetchTiming, RedirectTiming, DOMInteractiveTiming, DOMContentLoadedTiming, DOMCompleteTiming, LoadEventStartTiming, LoadEventEndTiming, NSToDOMContentLoadedTiming, FirstPaintTiming, RedirectCount, SocialSourceNetworkID, SocialSourcePage, ParamPrice, ParamOrderID, ParamCurrency, ParamCurrencyID, GoalsReached, OpenstatServiceName, OpenstatCampaignID, OpenstatAdID, OpenstatSourceID, UTMSource, UTMMedium, UTMCampaign, UTMContent, UTMTerm, FromTag, HasGCLID, RefererHash, URLHash, CLID, YCLID, ShareService, ShareURL, ShareTitle, `ParsedParams.Key1`, `ParsedParams.Key2`, `ParsedParams.Key3`, `ParsedParams.Key4`, `ParsedParams.Key5`, `ParsedParams.ValueDouble`, IslandID, RequestNum, RequestTry)) AS x │
│ FROM test.hits                                                                                                                                                                                                                                             │
│ PREWHERE URLDomain LIKE '%metrika%'                                                                                                                                                                                                                        │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘

3 rows in set. Elapsed: 0.004 sec. 

milovidov-desktop :) EXPLAIN SYNTAX SELECT sum(cityHash64(*)) AS x FROM merge(test, '^hits$') WHERE URLDomain LIKE '%metrika%'

EXPLAIN SYNTAX
SELECT sum(cityHash64(*)) AS x
FROM merge(test, '^hits$')
WHERE URLDomain LIKE '%metrika%'

Query id: fb059673-7da1-4cf4-9713-e5c7b9feb66d

┌─explain────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│ SELECT sum(cityHash64(WatchID, JavaEnable, Title, GoodEvent, EventTime, EventDate, CounterID, ClientIP, ClientIP6, RegionID, UserID, CounterClass, OS, UserAgent, URL, Referer, URLDomain, RefererDomain, Refresh, IsRobot, RefererCategories, URLCategories, URLRegions, RefererRegions, ResolutionWidth, ResolutionHeight, ResolutionDepth, FlashMajor, FlashMinor, FlashMinor2, NetMajor, NetMinor, UserAgentMajor, UserAgentMinor, CookieEnable, JavascriptEnable, IsMobile, MobilePhone, MobilePhoneModel, Params, IPNetworkID, TraficSourceID, SearchEngineID, SearchPhrase, AdvEngineID, IsArtifical, WindowClientWidth, WindowClientHeight, ClientTimeZone, ClientEventTime, SilverlightVersion1, SilverlightVersion2, SilverlightVersion3, SilverlightVersion4, PageCharset, CodeVersion, IsLink, IsDownload, IsNotBounce, FUniqID, HID, IsOldCounter, IsEvent, IsParameter, DontCountHits, WithHash, HitColor, UTCEventTime, Age, Sex, Income, Interests, Robotness, GeneralInterests, RemoteIP, RemoteIP6, WindowName, OpenerName, HistoryLength, BrowserLanguage, BrowserCountry, SocialNetwork, SocialAction, HTTPError, SendTiming, DNSTiming, ConnectTiming, ResponseStartTiming, ResponseEndTiming, FetchTiming, RedirectTiming, DOMInteractiveTiming, DOMContentLoadedTiming, DOMCompleteTiming, LoadEventStartTiming, LoadEventEndTiming, NSToDOMContentLoadedTiming, FirstPaintTiming, RedirectCount, SocialSourceNetworkID, SocialSourcePage, ParamPrice, ParamOrderID, ParamCurrency, ParamCurrencyID, GoalsReached, OpenstatServiceName, OpenstatCampaignID, OpenstatAdID, OpenstatSourceID, UTMSource, UTMMedium, UTMCampaign, UTMContent, UTMTerm, FromTag, HasGCLID, RefererHash, URLHash, CLID, YCLID, ShareService, ShareURL, ShareTitle, `ParsedParams.Key1`, `ParsedParams.Key2`, `ParsedParams.Key3`, `ParsedParams.Key4`, `ParsedParams.Key5`, `ParsedParams.ValueDouble`, IslandID, RequestNum, RequestTry)) AS x │
│ FROM merge('test', '^hits$')                                                                                                                                                                                                                               │
│ WHERE URLDomain LIKE '%metrika%'                                                                                                                                                                                                                           │
└────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```

Most likely because Merge table does not provide column sizes info.
We can provide it either:
- by iterating and summing across all tables;
- only for first N = 10 tables in case if the number of tables is very large.
bool supportsSampling() const override { return true; }
    bool supportsFinal() const override { return true; }
    bool supportsPrewhere() const override { return true; }
    bool supportsSubcolumns() const override { return true; }
    StoragePolicyPtr getStoragePolicy() const override;
    bool isRemote() const override { return true; }
    QueryProcessingStage::Enum
    getQueryProcessingStage(ContextPtr, QueryProcessingStage::Enum, const StorageMetadataPtr &, SelectQueryInfo &) const override;
    Pipe read(
        const Names & column_names,
        const StorageMetadataPtr & ,
        SelectQueryInfo & query_info,
        ContextPtr context,
        QueryProcessingStage::Enum processed_stage,
        size_t max_block_size,
        unsigned num_streams) override;
    void read(
        QueryPlan & query_plan,
        const Names & column_names,
        const StorageMetadataPtr & metadata_snapshot,
        SelectQueryInfo & query_info,
        ContextPtr context,
        QueryProcessingStage::Enum processed_stage,
        size_t ,
        unsigned ) override;
    bool supportsParallelInsert() const override { return true; }