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

Danny Chen commented on CALCITE-3419:
-------------------------------------

You can use SqlImplementor#toSql[1] to convert RexNode to SqlNode then use 
SqlNode#toSqlString to convert it to SQL-like string.

[1] 
https://github.com/apache/calcite/blob/3cbbafa941128dc5097c2a26711f5751f764e12d/core/src/main/java/org/apache/calcite/rel/rel2sql/SqlImplementor.java#L480

> Tools for converting List<RexNode>  to SQL expression string
> ------------------------------------------------------------
>
>                 Key: CALCITE-3419
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3419
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>            Reporter: jamie12221
>            Priority: Trivial
>
> 'org.apache.calcite.schema.ProjectableFilterableTable' Is a simple tool that 
> can apply filter expressions.On a datasource that uses SQL as a query 
> command, the org.apache.calcite.schema.ProjectableFilterableTable#scan method 
> applies a filter expression, and the filter expression may be converted to 
> SQL. I have not found a way to convert List<RexNode> to SQL. In particular, 
> OR expressions may involve some complicated operations.Is there a better 
> solution?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to