Skip to content
This repository was archived by the owner on Dec 29, 2025. It is now read-only.
This repository was archived by the owner on Dec 29, 2025. It is now read-only.

A bug when join ... on (condition 1 or condition2) #113

@lzbht

Description

@lzbht

when execute

SELECT 
    r2.business_unit, 
    SUM(r1.total_cost) AS total_cost
FROM 
   project_cost_split_data r1
JOIN 
   cloud_account r2 
ON 
    (r1.account = r2.name OR r1.manager = r2.name)
WHERE 
    r1.record_month LIKE '2024-%'
GROUP BY 
    r2.business_unit;

It will report error:

ERROR: clickhouse_fdw:Code: 170. DB::Exception: Bad get: has Bool, requested UInt64. (BAD_GET)
QUERY:SELECT r2.business_unit, r1.total_cost FROM observe.project_cost_split_data r1 ALL INNER JOIN observe.cloud_account r2 ON (TRUE) WHERE (((r1.account = r2.name) OR (r1.manager = r2.name))) AND ((r1.record_month LIKE '2024-%'))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions