[ 
https://issues.apache.org/jira/browse/CALCITE-6847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928624#comment-17928624
 ] 

xiong duan commented on CALCITE-6847:
-------------------------------------

Firstly, The two SQL examples above are identical. Please recheck and confirm.

Secondly, it is necessary to verify whether ClickHouse supports the query 
`SELECT 1=1`. Please cover this test case in the test scenarios. In 
CALCITE-6919, MSSQL does not support this query.

> Support ClickHouse Dialect with join on Boolean type
> ----------------------------------------------------
>
>                 Key: CALCITE-6847
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6847
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.38.0
>            Reporter: Yu Xu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.39.0
>
>
>  Currently ClickHouseSQL Dialect not support join on boolean type in 
> Calcite,but most system support with the syntax, so need to support it.
> syntax like:
> select A.id, B.name, B.address from A left join B on true;
> *query as on true:* 
> default> select  a.id
>          from
>              `default`.example_table2 as a
>          left join mincho_test.example_table2 as b on true
> [2025-02-19 23:36:04] Code: 403, e.displayText() = DB::Exception: Cannot get 
> JOIN keys from JOIN ON section: true (version 21.8.7.22 (official build))
>  
> *query as on 1=1:*
> default> select  a.id
>          from
>              `default`.example_table1 as a
>          left join `default`.example_table2 as b on true
> [2025-02-19 23:45:50] 18 rows retrieved starting from 1 in 125 ms (execution: 
> 105 ms, fetching: 20 ms)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to