Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-2685

error in EvalFunc ctor when implementing Algebraic UDF whose return type is parameterized

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0
    • None
    • impl
    • None
    • Patch Available

    Description

      EvalFunc ctor uses reference equality instead of value equality when verifying return type of "final" UDF and parent Algebraic UDF are equal. This is fine in the case when both values are Class instances, but breaks when return types are ParameterizedType instances. This prohibits the creation of an Algebraic UDF whose return type is Map<String, Long>, for instance. Please see the included unit test for an example along these lines.

      Attachments

        1. fixes_eval_func_algebraic_final_return_type_check.diff
          0.7 kB
          Andy Schlaikjer
        2. fixes_eval_func_algebraic_final_return_type_check-r2.diff
          2 kB
          Andy Schlaikjer
        3. PIG-2685_2.patch
          2 kB
          Jonathan Coveney

        Activity

          People

            Unassigned Unassigned
            hazen Andy Schlaikjer
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: