kevinweil/elephant-bird — pull request #226 by sagemintblue (2012-07-03 05:24:35+00:00)
Title: Adds test for pig to thrift enum value conversion failure

I ran into a problem were I had a script which generated enum ordinal values and passed these on to PigToThrift via one of the pig thrift storage impls, but was seeing null values in output. After looking at PigToThrift source, I realized it treats all input pig "enum" values as strings, using `value.toString()` before attempting to find an associated `TEnum` value. Of course, this was failing for my ordinal values, but it was failing silently. Annoying.

This patch adds a check for failure to convert stringified input value to valid thrift enum value.