**Describe what's wrong**

When starting a new empty ClickHouse server on a MacBook Pro M1 there seem to be some problems with the initial system table setup. Connecting the client gives an exception, as do a number of subsequent queries against a standard dataset - I'll focus on the first here.

I found two recent reports on Slack of what seems to be the same problem:

https://clickhousedb.slack.com/archives/CU478UEQZ/p1636612826400000 

https://clickhousedb.slack.com/archives/CU478UEQZ/p1636485760380400?thread_ts=1636466896.364500&cid=CU478UEQZ 

**Does it reproduce on recent release?**

For ARM64 I can only see a download link for the current master build so this relates to https://builds.clickhouse.com/master/macos-aarch64/clickhouse

**How to reproduce**

1. Download and run the current build for ARM64
    ```
    wget 'https://builds.clickhouse.com/master/macos-aarch64/clickhouse'
    chmod a+x ./clickhouse
    ./clickhouse server
    ```
2. Start the client
    `./clickhouse client`
3. Error messages in both client and server (see below), query autocomplete in the client does not work.

**Expected behavior**

There should be no error messages and query autocomplete should work.

**Error message and/or stacktrace**

On the server:
```
2021.11.15 10:38:08.011131 [ 709567 ] {5b495f2e-63bb-4291-a3b6-a80399c5e86b} <Error> executeQuery: Code: 49. DB::Exception: Invalid number of rows in Chunk column String position 0: expected 72, got 12. (LOGICAL_ERROR) (version 21.12.1.8751 (official build)) (from [::1]:59809) (in query: SELECT DISTINCT arrayJoin(extractAll(name, '[\\w_]{2,}')) AS res FROM (SELECT name FROM system.functions UNION ALL SELECT name FROM system.table_engines UNION ALL SELECT name FROM system.formats UNION ALL SELECT name FROM system.table_functions UNION ALL SELECT name FROM system.data_type_families UNION ALL SELECT name FROM system.merge_tree_settings UNION ALL SELECT name FROM system.settings UNION ALL SELECT cluster FROM system.clusters UNION ALL SELECT macro FROM system.macros UNION ALL SELECT policy_name FROM system.storage_policies UNION ALL SELECT concat(func.name, comb.name) FROM system.functions AS func CROSS JOIN system.aggregate_function_combinators AS comb WHERE is_aggregate UNION ALL SELECT name FROM system.databases LIMIT 10000 UNION ALL SELECT DISTINCT name FROM system.tables LIMIT 10000 UNION ALL SELECT DISTINCT name FROM system.dictionaries LIMIT 10000 UNION ALL SELECT DISTINCT name FROM system.columns LIMIT 10000) WHERE notEmpty(res)), Stack trace (when copying this message, always include the lines below):

<Empty trace>

2021.11.15 10:38:08.011167 [ 709567 ] {5b495f2e-63bb-4291-a3b6-a80399c5e86b} <Error> TCPHandler: Code: 49. DB::Exception: Invalid number of rows in Chunk column String position 0: expected 72, got 12. (LOGICAL_ERROR), Stack trace (when copying this message, always include the lines below):

<Empty trace>
```

On the client:
```
$ ./clickhouse client
ClickHouse client version 21.12.1.8751 (official build).
Connecting to localhost:9000 as user default.
Connected to ClickHouse server version 21.12.1 revision 54450.

mars :) Cannot load data for command line suggestions: Code: 49. DB::Exception: Received from localhost:9000. DB::Exception: Invalid number of rows in Chunk column String position 0: expected 72, got 12. (LOGICAL_ERROR) (version 21.12.1.8751 (official build))
```
{
    size_t size = data.size();
    if (size != filt.size())
        throw Exception("Size of filter doesn't match size of column.", ErrorCodes::SIZES_OF_COLUMNS_DOESNT_MATCH);
    auto res = this->create();
    Container & res_data = res->getData();
    if (result_size_hint)
        res_data.reserve(result_size_hint > 0 ? result_size_hint : size);
    const UInt8 * filt_pos = filt.data();
    const UInt8 * filt_end = filt_pos + size;
    const T * data_pos = data.data();
    /** A slightly more optimized version.
    * Based on the assumption that often pieces of consecutive values
    *  completely pass or do not pass the filter.
    * Therefore, we will optimistically check the parts of `SIMD_BYTES` values.
    */
    static constexpr size_t SIMD_BYTES = 64;
    const UInt8 * filt_end_aligned = filt_pos + size / SIMD_BYTES * SIMD_BYTES;
    while (filt_pos < filt_end_aligned)
    {
        UInt64 mask = Bytes64MaskToBits64Mask(filt_pos);
        if (0xffffffffffffffff == mask)
        {
            res_data.insert(data_pos, data_pos + SIMD_BYTES);
        }
        else
        {