Skip to content

Swarm: s3() + object_storage_cluster loses hostName() in remote aggregation (NOT_FOUND_COLUMN_IN_BLOCK) #2139

Description

@DimensionWieldr

Describe the bug

Selecting hostName() with aggregation over s3(...) using SETTINGS object_storage_cluster='swarm' fails with:

Code: 10. DB::Exception: Not found column hostName() in block. There are only columns: count(): While executing Remote. (NOT_FOUND_COLUMN_IN_BLOCK)

Remote aggregation returns only count() and drops hostName(), so the initiator cannot complete GROUP BY host.

How to reproduce

With a configured swarm remote cluster and Parquet data under the warehouse (e.g. after creating/seeding an Iceberg table via PyIceberg):

SELECT hostName() AS host, count()
FROM s3(
    'http://minio:9000/warehouse/data/data/**/**.parquet',
    '<access_key>',
    '<secret_key>'
)
GROUP BY host
SETTINGS use_hive_partitioning = 1, object_storage_cluster = 'swarm';

Observed error:

Code: 10. DB::Exception: Not found column hostName() in block. There are only columns: count(): While executing Remote. (NOT_FOUND_COLUMN_IN_BLOCK)

Observed on 26.3.13.20001.altinityantalya.

Expected behavior

Each swarm worker should evaluate hostName() locally and return it with partial aggregates, so the initiator can group by host.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions