[ https://issues.apache.org/jira/browse/PIG-3451?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Aniket Mokashi updated PIG-3451: -------------------------------- Status: Patch Available (was: Open) > EvalFunc<T> ctor reflection to determine value of type param T is brittle > ------------------------------------------------------------------------- > > Key: PIG-3451 > URL: https://issues.apache.org/jira/browse/PIG-3451 > Project: Pig > Issue Type: Bug > Components: impl > Affects Versions: 0.11.1 > Reporter: Andy Schlaikjer > Assignee: Andy Schlaikjer > Fix For: 0.12 > > Attachments: PIG-3451-3.patch > > > The {{EvalFunc<T>}} base class has logic in its default ctor to attempt to > determine the runtime type of its type parameter {{T}}. This logic is brittle > when the derived class has type parameters of its own. For instance: > {code} > public static abstract EvalFunc1<T> extends EvalFunc<T> {} > public static abstract EvalFunc2<X, T> extends EvalFunc1<T> {} > public static EvalFunc3<X> extends EvalFunc1<X, DataBag> { ... } > {code} > Here, {{EvalFunc3<X>}} does specify concrete type {{DataBag}} for {{T}} of > {{EvalFunc<T>}}, but the existing logic in the default ctor fails to identify > it. > Here's a unit test which reproduces this failure: > https://github.com/sagemintblue/pig/compare/apache:trunk...hazen/repro_eval_func_reflection_bug > Here's the test with an update to {{EvalFunc}}'s logic which fixes the issue: > https://github.com/sagemintblue/pig/compare/apache:trunk...hazen/fix_eval_func_reflection -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira