Review Board 1.7.22


CASE and IN fail when expression includes dereferencing operator

Review Request #12290 - Created July 6, 2013 and updated

Cheolsoo Park
PIG-3374
Reviewers
pig
pig-git
See PIG-3374 for details.
Added new test cases to TestIn and TestCase.

ant clean test -Dtestcase=TestIn
ant clean test -Dtestcase=TestCase
src/org/apache/pig/parser/AliasMasker.g
Revision 98d94f7 New Change
[20] 312 lines
[+20]
313
    | func_eval
313
    | func_eval
314
    | ^( BOOL_COND expr )
314
    | ^( BOOL_COND expr )
315
;
315
;
316

    
   
316

   
317
in_eval
317
in_eval
318
    : ^( IN expr expr+ )
318
    : ^( IN ( ^( IN_LHS expr ) ^( IN_RHS expr ) )+ )
319
;
319
;
320

    
   
320

   
321
func_eval
321
func_eval
322
    : ^( FUNC_EVAL func_name real_arg* )
322
    : ^( FUNC_EVAL func_name real_arg* )
323
;
323
;
[+20] [20] 31 lines
[+20]
355
var_expr
355
var_expr
356
    : projectable_expr ( dot_proj | pound_proj )*
356
    : projectable_expr ( dot_proj | pound_proj )*
357
;
357
;
358

    
   
358

   
359
projectable_expr
359
projectable_expr
360
    : func_eval | col_ref | bin_expr | case_expr
360
    : func_eval | col_ref | bin_expr | case_expr | case_cond
361
;
361
;
362

    
   
362

   
363
dot_proj
363
dot_proj
364
    : ^( PERIOD col_alias_or_index+ )
364
    : ^( PERIOD col_alias_or_index+ )
365
;
365
;
[+20] [20] 21 lines
[+20]
387
bin_expr
387
bin_expr
388
    : ^( BIN_EXPR cond expr expr )
388
    : ^( BIN_EXPR cond expr expr )
389
;
389
;
390

    
   
390

   
391
case_expr
391
case_expr
392
    : ^( CASE expr+ )
392
    : ^( CASE_EXPR ( ^( CASE_EXPR_LHS expr ) ( ^( CASE_EXPR_RHS expr) )+ )+ )

    
   
393
;

    
   
394

   

    
   
395
case_cond

    
   
396
    : ^( CASE_COND ^( WHEN cond+ ) ^( THEN expr+ ) )
393
;
397
;
394

    
   
398

   
395
limit_clause
399
limit_clause
396
    : ^( LIMIT rel ( INTEGER | LONGINTEGER | expr ) )
400
    : ^( LIMIT rel ( INTEGER | LONGINTEGER | expr ) )
397
;
401
;
[+20] [20] 349 lines
src/org/apache/pig/parser/AstPrinter.g
Revision ccccd87 New Change
 
src/org/apache/pig/parser/AstValidator.g
Revision d0ed0e8 New Change
 
src/org/apache/pig/parser/LogicalPlanGenerator.g
Revision cc1f47e New Change
 
src/org/apache/pig/parser/QueryParser.g
Revision d4d9700 New Change
 
test/org/apache/pig/test/TestCase.java
Revision 5d8f7f3 New Change
 
test/org/apache/pig/test/TestIn.java
Revision c3a55de New Change
 
  1. src/org/apache/pig/parser/AliasMasker.g: Loading...
  2. src/org/apache/pig/parser/AstPrinter.g: Loading...
  3. src/org/apache/pig/parser/AstValidator.g: Loading...
  4. src/org/apache/pig/parser/LogicalPlanGenerator.g: Loading...
  5. src/org/apache/pig/parser/QueryParser.g: Loading...
  6. test/org/apache/pig/test/TestCase.java: Loading...
  7. test/org/apache/pig/test/TestIn.java: Loading...