Details
-
New Feature
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
We create an internal Calcite repo at LinkedIn and develop APIs to parse any Pig Latin scripts into Calcite logical plan. The code was tested in nearly ~1000 Pig scripts written at LinkedIn.
Changes:
1. piglet: main conversion code live there, include:
- APIs to convert any Pig scripts into RelNode plans or SQL statements
- Use Pig Grunt parser to parse Pig Latin scripts into Pig logical plan (DAGs)
- Convert Pig schemas into RelDatatype
- Traverse through Pig expression plan and convert Pig expressions into RexNodes
- Map some basic Pig UDFs to Calcite SQL operators
- Build Calcite UDFs for any other Pig UDFs, including UDFs written in both Java and Python
- Traverse (DFS) through Pig logical plans to convert each Pig logical nodes to RelNodes
- Have an optimizer rule to optimize Pig group/cogroup into Aggregate operators
2. core:
- Implement other RelNode in Rel2Sql so that Pig can be translated into SQL
- Other minor changes in a few other classes to make Pig to Calcite works
Attachments
Issue Links
- relates to
-
CALCITE-3195 Handle UDF that throws checked exceptions in enumerable code generator
- Closed
-
CALCITE-3297 PigToSqlAggregateRule should be applied on multi-set projection to produce an optimal plan
- Closed
-
CALCITE-3307 PigRelExTest, PigRelOpTest and PigScriptTest fail on Windows
- Closed
-
CALCITE-3194 Convert Pig string patterns into SQL string patterns
- Open
-
CALCITE-3193 Add RelBuilder.uncollect method, and interface UncollectFactory, to instantiate Uncollect
- Open
- links to