Skip to content

Some optimizations are broken with object_storage_cluster #2245

Closed

Description

@ianton-ru
select count() from (select * from datalake.`iceberg.foo` as foo left join datalake.`iceberg.bar` as bar on foo.symbol=bar.symbol where foo.bid>=3) settings object_storage_cluster='ch-cluster-23', log_comment='test_select_from_select_join'

select count() from (select * from datalake.`iceberg.foo` as foo where foo.bid>=3) settings object_storage_cluster='ch-cluster-23', log_comment='test_select_from_select'

select * from datalake.`iceberg.foo` as foo left join datalake.`iceberg.bar` as bar on foo.symbol=bar.symbol where foo.bid>=3 settings object_storage_cluster='ch-cluster-23', log_comment='test_select_join'


select log_comment,ProfileEvents['IcebergMinMaxIndexPrunedFiles'] as pruned from system.query_log where type='QueryFinish' and log_comment like 'test_select_%'

   ┌─log_comment──────────────────┬─pruned─┐
1. │ test_select_from_select_join │      0 │
2. │ test_select_from_select      │      2 │
3. │ test_select_join             │      2 │
   └──────────────────────────────┴────────┘

Activity

  1. self-assigned this
    on Aug 21, 2026
  2. ianton-ru commented on Aug 21, 2026

    @ianton-ru
    Author

    The same with table function:

    select count() from (select * from icebergCluster('ch-cluster-23', 'http://minio1:9001/warehouse/data/', 'minio', 'minio123') as foo left join datalake.`iceberg.bar` as bar on foo.symbol=bar.symbol where foo.bid>=3) settings log_comment='test_2_select_from_select_join'
    
    select * from icebergCluster('ch-cluster-23', 'http://minio1:9001/warehouse/data/', 'minio', 'minio123') as foo left join datalake.`iceberg.bar` as bar on foo.symbol=bar.symbol where foo.bid>=3 settings log_comment='test_2_select_join'
    
    select count() from (select * from icebergCluster('ch-cluster-23', 'http://minio1:9001/warehouse/data/', 'minio', 'minio123') as foo where foo.bid>=3) settings log_comment='test_2_select_from_select'
    
    
    select log_comment,ProfileEvents['IcebergMinMaxIndexPrunedFiles'] as pruned from system.query_log where type='QueryFinish' and log_comment like 'test_2_select_%'
    
       ┌─log_comment────────────────────┬─pruned─┐
    1. │ test_2_select_from_select      │      2 │
    2. │ test_2_select_from_select_join │      0 │
    3. │ test_2_select_join             │      2 │
       └────────────────────────────────┴────────┘
    

    on antalya and on upstream versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions