Tao, I think, yes. the code is that :

```
JdbcImplementor.Result result = jdbcImplementor.visitChild(0, 
input.accept(SubsetRemover.INSTANCE));
sql = result.asStatement().toSqlString(dialect).getSql();

```


  Any help or pointer would be appreciated. Thanks.


------------------ ???????? ------------------
??????:                                                                         
                                               "dev"                            
                                                        
<[email protected]&gt;;
????????:&nbsp;2021??10??12??(??????) ????3:26
??????:&nbsp;"dev"<[email protected]&gt;;

????:&nbsp;Re: Disable the subquery



Do you use the RelToSqlConverter to&nbsp; convert plan to sql?

Regards!

Aron Tao


luoc <[email protected]&gt; ??2021??10??11?????? ????4:30??????

&gt; Hello Calcite team,
&gt;
&gt;
&gt; &amp;nbsp; I am going to develop a new feature on my project with the 
Calcite.
&gt; But got the following issues :
&gt;
&gt;
&gt; Input SQL :
&gt;
&gt;
&gt; SELECT A.N_NAME, B.R_NAME FROM V1.NATION A LEFT JOIN V1.REGION B ON
&gt; A.N_REGIONKEY = B.R_REGIONKEY WHERE B.R_NAME = 'ASIA';
&gt;
&gt;
&gt; Actual SQL (send to DB) :
&gt;
&gt;
&gt; SELECT "NATION0"."N_NAME" AS "n_name", "t"."R_NAME" AS "r_name"
&gt; FROM "V1"."NATION" AS "NATION0"
&gt; INNER JOIN (SELECT *
&gt; FROM "V1"."REGION"
&gt; WHERE "R_NAME" = 'ASIA') AS "t" ON "NATION0"."N_REGIONKEY" =
&gt; "t"."R_REGIONKEY";
&gt;
&gt;
&gt; If possible, How can I disable the join auto-convert to the subquery
&gt; syntax? Because the backend DB does not support the subquery (but the `left
&gt; join` is supported). Add the specified rule or rewrite the `JdbcJoinRule`
&gt; class ?
&gt;
&gt;
&gt; Thanks for your time.

Reply via email to