-
Notifications
You must be signed in to change notification settings - Fork 2.5k
[CALCITE-3122] Full implementation of converting Pig Latin scripts in… #1265
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
Conversation
| return planner; | ||
| } | ||
|
|
||
| public void setPlanner(RelOptPlanner planner) { |
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 is a HACK to reset planner for all nodes in a logical plan. Alternative may be to use a RelShuttle to make a new plan with the desired planner. Not sure if we have a better way.
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.
Can you explain why we have to reset planner? Thanks!
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.
After initial mapping of Pig logical plan to Calcite logical plan, I need to write an optimizer rule to optimize the plan. So need to write a new planner for to optimize the plan and assign this new planner to all rel nodes in the plan.
| /** | ||
| * Extension to {@link RelBuilder} for Pig logical operators. | ||
| */ | ||
| public class LogicalPigRelBuilder extends PigRelBuilder { |
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.
Quick question, what is the reason to extend PigRelBuilder instead of modifying PigRelBuilder directly?
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.
Because I want the Pig Rel builder to be in the piglet module. We can refactor the code, merge two classes into one and save it in Piglet.
| return planner; | ||
| } | ||
|
|
||
| public void setPlanner(RelOptPlanner planner) { |
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.
Can you explain why we have to reset planner? Thanks!
|
Any suggestions on fixing this error. I dont have a Window machine, so could not reproduce it locally.
|
…to Calcite relational algebra and Calcite SQL (Khai Tran)
…uilder are grouped together as original code
…r conversion as much as possible
…uilder and remame LogicalPigRelBuilder to PigRelBuilder
…t comments, and fix variable name mispelling
2ea14e3 to
2c0c3e2
Compare
…bra and Calcite SQL (Khai Tran) Fix RAT report on Travis on unapproved license files Add javadoc for SqlImplementor.resetAlias Move logic RexWindowBound.toSqlNode to SqlImplementor.Context Remove SqlNode.toSqlString and replace it with SqlNode.unparse Mute pig parser log in piglet tests Refactor DynamicTupleRecordType Log CALCITE-3193 for moving Uncollect to RelBuilder Log CALCITE-3194 for converting Pig string patterns into SQL string patterns Log CALCITE-3195 for fixing the enumerable code generator, then remove PigUDFWrapper Move ToLogicalConverter to an independent class and use RelBuilder for conversion as much as possible Refactor: remove dependency on core/PigRelBuilder from LogicalPigRelBuilder and remame LogicalPigRelBuilder to PigRelBuilder Resolve CALCITE-3193 and refactor the Pig UDF lookup code Close apache#1265
…s the PigToSqlAggregateRule being applied to produce a more optimized plan for multieset projection
…bra and Calcite SQL (Khai Tran) Remove SqlNode.toSqlString and replace it with SqlNode.unparse. Mute pig parser log in piglet tests. Refactor DynamicTupleRecordType. Remove dependency on core/PigRelBuilder from LogicalPigRelBuilder and rename LogicalPigRelBuilder to PigRelBuilder. Fix RAT report on Travis on unapproved license files. Close apache#1265
…bra and Calcite SQL (Khai Tran) Remove SqlNode.toSqlString and replace it with SqlNode.unparse. Mute pig parser log in piglet tests. Refactor DynamicTupleRecordType. Remove dependency on core/PigRelBuilder from LogicalPigRelBuilder and rename LogicalPigRelBuilder to PigRelBuilder. Fix RAT report on Travis on unapproved license files. Close apache#1265
…to Calcite relational algebra and Calcite SQL (Khai Tran)