Skip to content

Join fails with hybrid table #1209

@alsugiliazova

Description

@alsugiliazova

Setup as in this issue #1208

SELECT
    h.string_col,
    h.long_col AS hybrid_long,
    m.long_col AS mt_long
FROM default.hybrid_table AS h
FULL OUTER JOIN merge_tree_table_3ef2c546_d5d6_11f0_b816_e0c26496f172 AS m ON h.string_col = m.string_col
LIMIT 10
SETTINGS object_storage_cluster_join_mode = 'local'
Query id: 8ee0d109-68de-4126-a737-7dba1dad9c74

   ┌─string_col─┬─hybrid_long─┬─mt_long─┐
1. │ William    │        9044 │    9044 │
2. │ Frank      │        8751 │    8751 │
3. │ Isaac      │        3611 │    3611 │
4. │ Louis      │        1519 │    1519 │
5. │ Oliver     │        1654 │    1654 │
   └────────────┴─────────────┴─────────┘

5 rows in set. Elapsed: 0.021 sec. 
SELECT
    h.string_col,
    h.long_col AS hybrid_long,
    m.long_col AS mt_long
FROM default.hybrid_table AS h
FULL OUTER JOIN merge_tree_table_3ef2c546_d5d6_11f0_b816_e0c26496f172 AS m ON h.string_col = m.string_col
LIMIT 10
SETTINGS object_storage_cluster_join_mode = 'allow'
Query id: 7ffb9a39-a052-4b94-b114-175d967ecb03

   ┌─string_col─┬─hybrid_long─┬─mt_long─┐
1. │ Frank      │        8751 │    8751 │
2. │ William    │        9044 │    9044 │
3. │ Louis      │        1519 │    1519 │
4. │ Isaac      │        3611 │    3611 │
5. │ Oliver     │        1654 │    1654 │
   └────────────┴─────────────┴─────────┘

5 rows in set. Elapsed: 0.019 sec. 

Received exception from server (version 25.8.9):
Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Received from clickhouse2:9000. DB::Exception: Unknown table expression identifier 'default.merge_tree_table_3ef2c546_d5d6_11f0_b816_e0c26496f172' in scope SELECT __table1.string_col AS string_col, __table1.long_col AS hybrid_long, __table2.long_col AS mt_long FROM icebergCluster('replicated_cluster', 'http://minio:9000/warehouse/data_hybrid', 'admin', 'password', 'Parquet', '`boolean_col` Nullable(Bool), `long_col` Nullable(Int64), `double_col` Nullable(Float64), `string_col` String, `timestamp_col` Nullable(DateTime64(6)), `date_col` Nullable(Date), `time_col` Nullable(Int64), `timestamptz_col` Nullable(DateTime64(6, \'UTC\')), `integer_col` Nullable(Int32), `float_col` Nullable(Float32), `decimal_col` Nullable(Decimal(10, 2))') AS __table1 ALL FULL OUTER JOIN default.merge_tree_table_3ef2c546_d5d6_11f0_b816_e0c26496f172 AS __table2 ON __table1.string_col = __table2.string_col WHERE __table1.date_col > '2024-01-01' LIMIT _CAST(10, 'UInt64'). (UNKNOWN_TABLE)

And also this fails both with with object_storage_cluster_join_mode local and allow:

SELECT
    h.string_col,
    h.long_col AS hybrid_long,
    m.long_col AS mt_long,
    i.long_col AS iceberg_long
FROM default.hybrid_table AS h
FULL OUTER JOIN merge_tree_table_3ef2c546_d5d6_11f0_b816_e0c26496f172 AS m ON h.string_col = m.string_col
FULL OUTER JOIN database_39afd42b_d5d6_11f0_b919_e0c26496f172.`namespace_39afe1b3_d5d6_11f0_9b00_e0c26496f172.table_39afe20a_d5d6_11f0_8208_e0c26496f172` AS i ON h.string_col = i.string_col
LIMIT 10
SETTINGS object_storage_cluster_join_mode = 'local'
Query id: d9c3bc8e-b47f-4d25-bdbb-724f7d5cf101

   ┌─h.string_col─┬─hybrid_long─┬─mt_long─┬─iceberg_long─┐
1. │ Isaac        │        3611 │    3611 │         3611 │
2. │ Frank        │        8751 │    8751 │         8751 │
3. │ William      │        9044 │    9044 │         9044 │
4. │ Louis        │        1519 │    1519 │         1519 │
5. │ Oliver       │        1654 │    1654 │         1654 │
   └──────────────┴─────────────┴─────────┴──────────────┘

5 rows in set. Elapsed: 0.049 sec. 

Received exception from server (version 25.8.9):
Code: 60. DB::Exception: Received from localhost:9000. DB::Exception: Received from clickhouse2:9000. DB::Exception: Unknown table expression identifier 'default.merge_tree_table_3ef2c546_d5d6_11f0_b816_e0c26496f172' in scope SELECT __table1.string_col AS string_col, __table1.long_col AS long_col, __table1.date_col AS date_col FROM icebergCluster('replicated_cluster', 'http://minio:9000/warehouse/data_hybrid', 'admin', 'password', 'Parquet', '`boolean_col` Nullable(Bool), `long_col` Nullable(Int64), `double_col` Nullable(Float64), `string_col` String, `timestamp_col` Nullable(DateTime64(6)), `date_col` Nullable(Date), `time_col` Nullable(Int64), `timestamptz_col` Nullable(DateTime64(6, \'UTC\')), `integer_col` Nullable(Int32), `float_col` Nullable(Float32), `decimal_col` Nullable(Decimal(10, 2))') AS __table1 ALL FULL OUTER JOIN default.merge_tree_table_3ef2c546_d5d6_11f0_b816_e0c26496f172 AS __table2 ON __table1.string_col = __table2.string_col WHERE __table1.date_col > '2024-01-01' LIMIT _CAST(10, 'UInt64'). (UNKNOWN_TABLE)
SELECT
    h.string_col,
    h.long_col AS hybrid_long,
    m.long_col AS mt_long,
    i.long_col AS iceberg_long
FROM default.hybrid_table AS h
FULL OUTER JOIN merge_tree_table_3ef2c546_d5d6_11f0_b816_e0c26496f172 AS m ON h.string_col = m.string_col
FULL OUTER JOIN database_39afd42b_d5d6_11f0_b919_e0c26496f172.`namespace_39afe1b3_d5d6_11f0_9b00_e0c26496f172.table_39afe20a_d5d6_11f0_8208_e0c26496f172` AS i ON h.string_col = i.string_col
LIMIT 10
SETTINGS object_storage_cluster_join_mode = 'allow'
Query id: ce905be1-b1c3-4612-9a52-802e806d20d6


Elapsed: 0.054 sec. 

Received exception from server (version 25.8.9):
Code: 81. DB::Exception: Received from localhost:9000. DB::Exception: Received from clickhouse2:9000. DB::Exception: Database database_39afd42b_d5d6_11f0_b919_e0c26496f172 does not exist. (UNKNOWN_DATABASE)

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions