-
Notifications
You must be signed in to change notification settings - Fork 142
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[POC] Make Calcite execute successfully #3258
base: feature/calcite-engine
Are you sure you want to change the base?
[POC] Make Calcite execute successfully #3258
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@qianheng-aws is this PR plan for review?
Signed-off-by: Heng Qian <qianheng@amazon.com>
…able when visitRelation. Signed-off-by: Heng Qian <qianheng@amazon.com>
148b79c
to
cf34fab
Compare
Yeah, but it should only be merged to the feature branch |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR ensure CalciteStandaloneIT passes?
- Could u refine the PR description? Make Calcite execute is generic.
- Could u enable CalciteStandaloneIT, and disable other PPL ITs. we expected IT should passed.
@@ -102,30 +113,50 @@ public ExplainResponseNode visitTableScan( | |||
@Override | |||
public void execute( | |||
RelNode rel, CalcitePlanContext context, ResponseListener<QueryResponse> listener) { | |||
try (PreparedStatement statement = RelRunners.run(rel)) { | |||
Connection connection = context.connection; | |||
final RelShuttle shuttle = new RelHomogeneousShuttle(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it required?
@Override | ||
public Table get(Object key) { | ||
if (!super.containsKey(key)) { | ||
registerTable((String) key); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we do registerTable(new QualifiedName((String)key)) instead?
try { | ||
this.statement = connection.createStatement().unwrap(CalciteServerStatement.class); | ||
} catch (Exception e) { | ||
throw new RuntimeException("create statement failed", e); | ||
} | ||
this.prepare = new CalcitePrepareImpl(); | ||
this.relBuilder = prepare.perform(statement, config, | ||
(cluster, relOptSchema, rootSchema, statement) -> new OSRelBuilder(config.getContext(), | ||
cluster, relOptSchema)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could u help explain the purpose this statement?
Description
Related Issues
Resolves #[Issue number to be closed when this PR is merged]
Check List
--signoff
.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.