Skip to content
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

[BEAM-4044] [SQL] Make BeamCalciteTable self planning #5154

Merged
merged 1 commit into from Apr 24, 2018

Conversation

apilloud
Copy link
Member

This is some cleanup moving us towards only using the calcite environment. This is required for calcite's builtin DDL support. There is no test changes, functional changes, or public API changes. The core nugget of this change is that the planner rules no longer require access to the BeamSqlEnv.


Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue.
  • Write a pull request description that is detailed enough to understand:
    • What the pull request does
    • Why it does it
    • How it does it
    • Why this approach
  • Each commit in the pull request should have a meaningful subject line and body.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

@apilloud
Copy link
Member Author

R: @kennknowles This is a refactor PR contained entirely in sql/impl.
cc: @xumingmin

@apilloud apilloud force-pushed the cleanup branch 2 times, most recently from 25636a7 to 553b41c Compare April 17, 2018 18:34
@apilloud
Copy link
Member Author

run java precommit

4 similar comments
@apilloud
Copy link
Member Author

run java precommit

@apilloud
Copy link
Member Author

run java precommit

@apilloud
Copy link
Member Author

run java precommit

@apilloud
Copy link
Member Author

run java precommit

Copy link
Member

@kennknowles kennknowles left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a nice simplification, leveraging Calcite.

@Override
public void flattenRel(RelStructuredTypeFlattener flattener) {
// rewriteGeneric calls this.copy. Setting isFlattining passes
// this context into copy for modificaiton of the flattened flag.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

modification

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed! Thanks.

@apilloud apilloud force-pushed the cleanup branch 2 times, most recently from 15f82d1 to f873611 Compare April 20, 2018 18:55
@apilloud
Copy link
Member Author

The set of findbugs tests run by maven and gradle are not the same.

@kennknowles
Copy link
Member

Personally, I think findbugs is not worthwhile once we have Errorprone or Checker. So anything expedient to get past this is fine by me.

@apilloud
Copy link
Member Author

I dropped the Serializable from the table class, which should fix it. The error message suggests adding readObject which makes other code odities make more sense.

@akedin
Copy link
Contributor

akedin commented Apr 23, 2018

LGTM

Copy link

@mingmxu mingmxu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,
CalciteSchema is a better option to hold all the environment information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants