Skip to content

Read using IcebergLocal returns Nulls instead of actual rows #1545

@alsugiliazova

Description

@alsugiliazova

Describe the bug
Introduced in docker://altinity/clickhouse-server:25.8.9.20207.altinityantalya-alpine and has been like that in all new versions.

SELECT *
FROM icebergLocal('/var/lib/clickhouse/user_files/iceberg_local_basic', 'Parquet', SETTINGS iceberg_metadata_table_uuid = 'fbb0a4ea-488e-4387-9cdc-23888ec32fae')
FORMAT TSV

Query id: 53c9aef3-fa0b-43e5-b386-eeb9f8c316a6

\N	\N	\N
\N	\N	\N
\N	\N	\N

3 rows in set. Elapsed: 0.004 sec. 

DESCRIBE TABLE icebergLocal('/var/lib/clickhouse/user_files/iceberg_local_basic', 'Parquet', SETTINGS iceberg_metadata_table_uuid = 'fbb0a4ea-488e-4387-9cdc-23888ec32fae')

Query id: 088a7662-7801-44e3-8b1c-13b818762105

   ┌─name────┬─type──────────────┬─default_type─┬─default_expression─┬─comment─┬─codec_expression─┬─ttl_expression─┐
1. │ name    │ Nullable(String)  │              │                    │         │                  │                │
2. │ double  │ Nullable(Float64) │              │                    │         │                  │                │
3. │ integer │ Nullable(Int64)   │              │                    │         │                  │                │
   └─────────┴───────────────────┴──────────────┴────────────────────┴─────────┴──────────────────┴────────────────┘

3 rows in set. Elapsed: 0.001 sec. 

Expected result


SELECT version()

Query id: d2049702-453b-49fd-b210-26a16e02905c

   ┌─version()────────────────────┐
1. │ 25.6.5.20420.altinityantalya │
   └──────────────────────────────┘

1 row in set. Elapsed: 0.001 sec. 

clickhouse1 :) SELECT *
                                      FROM icebergLocal(
                                          '/var/lib/clickhouse/user_files/iceberg_local_basic',
                                          'Parquet',
                                          SETTINGS iceberg_metadata_table_uuid = 'fbb0a4ea-488e-4387-9cdc-23888ec32fae'
                                      )
                                      ORDER BY name
                                      FORMAT TSV

SELECT *
FROM icebergLocal('/var/lib/clickhouse/user_files/iceberg_local_basic', 'Parquet', SETTINGS iceberg_metadata_table_uuid = 'fbb0a4ea-488e-4387-9cdc-23888ec32fae')
ORDER BY name ASC
FORMAT TSV

Query id: f05099d2-f358-4718-a389-44f866c7a05d

Alice	195.23	20
Bob	123.45	30
Charlie	67.89	40

3 rows in set. Elapsed: 0.006 sec. 

clickhouse1 :) 

Root cause is PR #1069

When allow_experimental_iceberg_read_optimization is turned off, I can see rows again.

SET allow_experimental_iceberg_read_optimization = 0

Query id: 8e051545-d639-4097-8005-606c0ed2875b

Ok.

0 rows in set. Elapsed: 0.001 sec. 

SELECT *
FROM icebergLocal('/var/lib/clickhouse/user_files/iceberg_local_basic', 'Parquet', SETTINGS iceberg_metadata_table_uuid = 'fbb0a4ea-488e-4387-9cdc-23888ec32fae')
ORDER BY name ASC
FORMAT TSV

Query id: ab4c2f6b-7051-4b32-bec0-065828fd8128

Alice	195.23	20
Bob	123.45	30
Charlie	67.89	40

3 rows in set. Elapsed: 0.010 sec. 

Metadata

Metadata

Assignees

No one assigned

    Labels

    antalyabugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions