[
https://issues.apache.org/jira/browse/BEAM-9379?focusedWorklogId=520813&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-520813
]
ASF GitHub Bot logged work on BEAM-9379:
----------------------------------------
Author: ASF GitHub Bot
Created on: 06/Dec/20 19:16
Start Date: 06/Dec/20 19:16
Worklog Time Spent: 10m
Work Description: nielsbasjes edited a comment on pull request #12962:
URL: https://github.com/apache/beam/pull/12962#issuecomment-739500944
I am in need of advice / assistance.
What I ran into is that some tests in the current state of this pull request
fail over a change in Calcite.
I am specifically talking about
https://github.com/apache/beam/blob/master/sdks/java/extensions/sql/jdbc/src/test/java/org/apache/beam/sdk/extensions/sql/jdbc/BeamSqlLineTest.java#L63
and many other tests in this file that do a `CREATE EXTERNAL TABLE` or a `DROP
TABLE`.
I tracked the source of this exception back to Calcite where a few months
ago this default method was added in Calcite by @julianhyde :
https://github.com/apache/calcite/blob/master/core/src/main/java/org/apache/calcite/sql/parser/SqlParserImplFactory.java#L58
This default implementation simply returns a `DdlExecutor` (a new interface)
that always fails with a `UnsupportedOperationException` if no valid
implementation has been provided.
Looks good so far.
The problem I have is that my knowledge is lacking how to correctly override
this method to return the implementation for Beam that makes it possible to do
a `CREATE EXTERNAL TABLE`.
A pointer on how I should fix this correctly is highly appreciated.
----
I found in the generated code of BeamSqlParserImpl this code (I shortened it
a bit)
```
public static final SqlParserImplFactory FACTORY = new
SqlParserImplFactory() {
public SqlAbstractParserImpl getParser(Reader reader) {
final BeamSqlParserImpl parser = new BeamSqlParserImpl(reader);
...
return parser;
}
};
```
which is generated from a template in Calcite itself and (as far as I have
been able to find so far) does not have a way of implementing a non-default
method for `DdlExecutor getDdlExecutor()`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 520813)
Time Spent: 7h (was: 6h 50m)
> Upgrade to Calcite 1.25.0
> -------------------------
>
> Key: BEAM-9379
> URL: https://issues.apache.org/jira/browse/BEAM-9379
> Project: Beam
> Issue Type: Task
> Components: dsl-sql
> Reporter: Rui Wang
> Priority: P2
> Time Spent: 7h
> Remaining Estimate: 0h
>
> Upgrade to Calcite 1.22.0 after it gets released (expected by end of Feb
> 2020).
--
This message was sent by Atlassian Jira
(v8.3.4#803005)