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

Julian Hyde commented on CALCITE-6678:
--------------------------------------

You can't add tests in {{dummy.iq}}. That file is intentionally empty, for 
debugging. Please move them somewhere else.

It would have been better to model {{DUAL}} as a view {{VALUES ('Y')}}. That 
way it can be optimized, and doesn't force the plan to use enumerable 
convention.

> Calcite should support dual table query when db provides this feature
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-6678
>                 URL: https://issues.apache.org/jira/browse/CALCITE-6678
>             Project: Calcite
>          Issue Type: Improvement
>            Reporter: Zhengqiang Duan
>            Assignee: Zhengqiang Duan
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.39.0
>
>
> Currently, both MySQL and Oracle support SQL like SELECT 1 + 1 FROM DUAL. 
> When I tried to execute it in Calcite, the following exception occurred:
> {code:java}
> From line 1, column 19 to line 1, column 22: Object 'DUAL' not found {code}
> DUAL tables are commonly used in Oracle, and since Oracle requires that FROM 
> be specified, I think we should support it.
> Here are some documents related to the DUAL table:
>  * Oracle: 
> [https://docs.oracle.com/en/database/oracle/oracle-database/23/sqlrf/Selecting-from-the-DUAL-Table.html]
>  * MySQL: [https://dev.mysql.com/doc/refman/5.7/en/select.html]



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

Reply via email to