[
https://issues.apache.org/jira/browse/CALCITE-7764?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132657#comment-18132657
]
krooswu edited comment on CALCITE-7764 at 10/26/26, 11:52 PM:
--------------------------------------------------------------
Fixed in
[https://github.com/apache/calcite/commit/ec84d7d1e7d686b61f34062a4177ac5f2600be89].
Thank you for your review [ Mihai Budiu
|https://issues.apache.org/jira/secure/ViewProfile.jspa?name=mbudiu]
was (Author: JIRAUSER308217):
Fixed in
https://github.com/apache/calcite/commit/ec84d7d1e7d686b61f34062a4177ac5f2600be89.
Thank you for your review [Mihai.
|http://issues.apache.org/jira/secure/ViewProfile.jspa?name=mbudiu]
> Allow explicit tables at top-level, e.g. "TABLE emp"
> ----------------------------------------------------
>
> Key: CALCITE-7764
> URL: https://issues.apache.org/jira/browse/CALCITE-7764
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: krooswu
> Priority: Major
> Labels: pull-request-available
>
> Calcite allows explicit tables (e.g. "{{{}TABLE emp{}}}") but not at
> top-level. "\{{SELECT * FROM (TABLE emp)}}" is valid but "\{{TABLE emp}}"
> throws:
> {code:java}
> TABLE emp;
> > java.sql.SQLException: Error while executing SQL "table emp": class
> > org.apache.calcite.sql.SqlBasicCall: TABLE `scott`.`EMP`
> > at org.apache.calcite.avatica.Helper.createException(Helper.java:56)
> ...
> > Caused by: java.lang.UnsupportedOperationException: class
> > org.apache.calcite.sql.SqlBasicCall: TABLE `scott`.`EMP`
> > at org.apache.calcite.util.Util.needToImplement(Util.java:1213)
> > at
> > org.apache.calcite.sql.validate.SqlValidatorImpl.getValidatedNodeType(SqlValidatorImpl.java:2274)
> > at org.apache.calcite.prepare.Prepare.prepareSql(Prepare.java:279){code}
> Also allow {{TABLE emp ORDER BY deptno}}.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)