Skip to content

Conversation

@khaitranq
Copy link
Contributor

…to Calcite relational algebra and Calcite SQL (Khai Tran)

return planner;
}

public void setPlanner(RelOptPlanner planner) {
Copy link
Contributor Author

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.

Copy link
Member

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!

Copy link
Contributor Author

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 {
Copy link
Member

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?

Copy link
Contributor Author

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) {
Copy link
Member

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!

@khaitranq
Copy link
Contributor Author

Any suggestions on fixing this error. I dont have a Window machine, so could not reproduce it locally.

2019-06-12 01:58:46,142 [pool-1-thread-1] ERROR - Failed to locate the winutils binary in the hadoop binary path
java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:382)
at org.apache.hadoop.util.Shell.getWinUtilsPat

…to Calcite relational algebra and Calcite SQL (Khai Tran)
…uilder are grouped together as original code
…uilder and remame LogicalPigRelBuilder to PigRelBuilder
…t comments, and fix variable name mispelling
@khaitranq khaitranq force-pushed the pull-request-khaitran branch from 2ea14e3 to 2c0c3e2 Compare August 21, 2019 17:23
julianhyde pushed a commit to julianhyde/calcite that referenced this pull request Aug 26, 2019
…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
julianhyde pushed a commit to julianhyde/calcite that referenced this pull request Aug 26, 2019
…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
@asfgit asfgit closed this in e5ae179 Aug 27, 2019
wangxlong pushed a commit to wangxlong/calcite that referenced this pull request Feb 13, 2020
…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
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.

2 participants