Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
Description
The alias used for RANK is not proper and that causing parameter not found error during conversion.
A = LOAD 'scott.EMP' as (EMPNO:int, ENAME:chararray, JOB:chararray, MGR:int, HIREDATE:datetime, SAL:bigdecimal, COMM:bigdecimal, DEPTNO:int); B = FOREACH A GENERATE EMPNO, JOB, DEPTNO; C = RANK B; D = FILTER C by ($0 > 1);
java.lang.IllegalArgumentException: field [rank_B] not found; input fields are: [rank_C, EMPNO, JOB, DEPTNO] at org.apache.calcite.piglet.PigRelExVisitor.visit(PigRelExVisitor.java:220) at org.apache.pig.newplan.logical.expression.ProjectExpression.accept(ProjectExpression.java:215) at org.apache.calcite.piglet.PigRelExWalker.postOrderWalk(PigRelExWalker.java:76) at org.apache.calcite.piglet.PigRelExWalker.postOrderWalk(PigRelExWalker.java:73) at org.apache.calcite.piglet.PigRelExWalker.walk(PigRelExWalker.java:58) at org.apache.calcite.piglet.PigRelExVisitor.translate(PigRelExVisitor.java:123) at org.apache.calcite.piglet.PigRelExVisitor.translatePigEx(PigRelExVisitor.java:142) at org.apache.calcite.piglet.PigRelExVisitor.translatePigEx(PigRelExVisitor.java:157) at org.apache.calcite.piglet.PigRelOpVisitor.visit(PigRelOpVisitor.java:175) at org.apache.pig.newplan.logical.relational.LOFilter.accept(LOFilter.java:79) at org.apache.calcite.piglet.PigRelOpWalker.postOrderWalk(PigRelOpWalker.java:84) at org.apache.calcite.piglet.PigRelOpWalker.walk(PigRelOpWalker.java:62) at org.apache.calcite.piglet.PigRelOpVisitor.translate(PigRelOpVisitor.java:133) at org.apache.calcite.piglet.PigConverter.pigPlan2Rel(PigConverter.java:198) at org.apache.calcite.piglet.PigConverter.pigQuery2Rel(PigConverter.java:157) at org.apache.calcite.test.PigRelOpTest$Fluent.assertRel(PigRelOpTest.java:76) at org.apache.calcite.test.PigRelOpTest$Fluent.assertRel(PigRelOpTest.java:90) at org.apache.calcite.test.PigRelOpTest$Fluent.access$000(PigRelOpTest.java:64) at org.apache.calcite.test.PigRelOpTest.testRankAndFilter(PigRelOpTest.java:1628)
Attachments
Issue Links
- is related to
-
CALCITE-785 Add "Piglet", a subset of Pig Latin on top of Calcite algebra
- Closed
- links to