Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Pig >> mail # dev >> Review Request: PIG-3268 Case statement support

Cheolsoo Park 2013-04-08, 17:24
Copy link to this message
Re: Review Request: PIG-3268 Case statement support

This is an automatically generated e-mail. To reply, visit:

(Updated April 10, 2013, 3:10 a.m.)
Review request for pig.

I took a completely new approach after discussion with Aniket. Instead of using built-in UDFs, I am converting CASE statement to nested BinCondExpression in LogicalPlanGenerator. So there is no longer a limit on number of when branches.

Thanks Aniket for the suggestion!

Add SQL CASE statement to Pig. Please see:
This addresses bug PIG-3268.
Diffs (updated)

  src/org/apache/pig/parser/AliasMasker.g 9cc7971
  src/org/apache/pig/parser/AstPrinter.g 5d83bea
  src/org/apache/pig/parser/AstValidator.g b85e238
  src/org/apache/pig/parser/LogicalPlanGenerator.g 26f13f6
  src/org/apache/pig/parser/QueryLexer.g c7f9fdd
  src/org/apache/pig/parser/QueryParser.g 538621b
  test/commit-tests 5081fbc
  test/org/apache/pig/test/TestCase.java e69de29

Diff: https://reviews.apache.org/r/10341/diff/

Added two new test suites:
- TestCase.java
- TestCaseUdf.java

Also ran ant test-commit.

Cheolsoo Park

Cheolsoo Park 2013-04-10, 03:50
Cheolsoo Park 2013-04-12, 00:10
Cheolsoo Park 2013-04-12, 01:42
Aniket Mokashi 2013-04-12, 17:33
Aniket Mokashi 2013-04-12, 18:23