[
https://issues.apache.org/jira/browse/CALCITE-4442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
chener updated CALCITE-4442:
----------------------------
Description:
I want to extend the ALTER TABLE statement ,but I find it is impossible to do
that unless i change the source code :
{code:java}
// parser.jj
/** too long to ignore **/
SqlAlter SqlAlter() :
{
final Span s;
final String scope;
final SqlAlter alterNode;
}
{
<ALTER> { s = span(); }
scope = Scope()
/** too long to ignore **/{code}
Here you see the ALTER statement must have a scope SYSTEM or SESSION ,which is
confined
was:
When i am extending a customer sql parser which to resolve ALTER TABLE
statement,I got this error when compile:
{quote}
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR]
/C:/workspace/java/dtstack/test/calcite-test/target/generated-sources/org/apache/calcite/sql/parser/impl/SqlAlterParserImpl.java:[3673,39]
不兼容的类型: org.apache.calcite.sql.
parser.Span无法转换为org.apache.calcite.sql.parser.SqlParserPos
[INFO] 1 error
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.905 s
[INFO] Finished at: 2020-12-17T21:20:36+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on
project calcite-test: Compilation failure
[ERROR]
/C:/workspace/java/dtstack/test/calcite-test/target/generated-sources/org/apache/calcite/sql/parser/impl/SqlAlterParserImpl.java:[3673,39]
不兼容的类型: org.apache.calcite.sql.
parser.Span无法转换为org.apache.calcite.sql.parser.SqlParserPos
{quote}
undefined
> SqlAlter extend not support ALTER TABLE statement
> --------------------------------------------------
>
> Key: CALCITE-4442
> URL: https://issues.apache.org/jira/browse/CALCITE-4442
> Project: Calcite
> Issue Type: Wish
> Components: core
> Affects Versions: 1.18.0
> Environment: calcite 1.18.0
> and so does the latest 1.26.0
> Reporter: chener
> Priority: Major
>
> I want to extend the ALTER TABLE statement ,but I find it is impossible to do
> that unless i change the source code :
>
> {code:java}
> // parser.jj
> /** too long to ignore **/
> SqlAlter SqlAlter() :
> {
> final Span s;
> final String scope;
> final SqlAlter alterNode;
> }
> {
> <ALTER> { s = span(); }
> scope = Scope()
> /** too long to ignore **/{code}
> Here you see the ALTER statement must have a scope SYSTEM or SESSION ,which
> is confined
>
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)