Jesse Yates created CALCITE-817:
-----------------------------------
Summary: Extension column cannot have name "row"
Key: CALCITE-817
URL: https://issues.apache.org/jira/browse/CALCITE-817
Project: Calcite
Issue Type: Bug
Affects Versions: 1.4.0-incubating
Reporter: Jesse Yates
Assignee: Julian Hyde
A weird corner case, but it seems like you cannot have an extension column with
the name "row". Blows up with:
{quote}
Caused by: java.sql.SQLException: error while executing SQL "select stream *
from orders EXTEND (row varchar)": parse failed: Encountered "row" at line 1,
column 37.
Was expecting one of:
<IDENTIFIER> ...
<QUOTED_IDENTIFIER> ...
<BACK_QUOTED_IDENTIFIER> ...
<BRACKET_QUOTED_IDENTIFIER> ...
<UNICODE_QUOTED_IDENTIFIER> ...
at org.apache.calcite.avatica.Helper.createException(Helper.java:41)
at
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:112)
at
org.apache.calcite.avatica.AvaticaStatement.executeQuery(AvaticaStatement.java:130)
at
org.apache.calcite.test.CalciteAssert.assertQuery(CalciteAssert.java:450)
... 29 more
Caused by: java.lang.RuntimeException: parse failed: Encountered "row" at line
1, column 37.
Was expecting one of:
<IDENTIFIER> ...
<QUOTED_IDENTIFIER> ...
<BACK_QUOTED_IDENTIFIER> ...
<BRACKET_QUOTED_IDENTIFIER> ...
<UNICODE_QUOTED_IDENTIFIER> ...
at
org.apache.calcite.prepare.CalcitePrepareImpl.prepare2_(CalcitePrepareImpl.java:647)
at
org.apache.calcite.prepare.CalcitePrepareImpl.prepare_(CalcitePrepareImpl.java:570)
at
org.apache.calcite.prepare.CalcitePrepareImpl.prepareSql(CalcitePrepareImpl.java:539)
at
org.apache.calcite.jdbc.CalciteConnectionImpl.parseQuery(CalciteConnectionImpl.java:173)
at
org.apache.calcite.jdbc.CalciteMetaImpl.prepareAndExecute(CalciteMetaImpl.java:561)
at
org.apache.calcite.avatica.AvaticaConnection.prepareAndExecuteInternal(AvaticaConnection.java:477)
at
org.apache.calcite.avatica.AvaticaStatement.executeInternal(AvaticaStatement.java:110)
... 31 more
{quote}
Any other name seems to work (but not sure where to check for this in the code).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)