Pig
  1. Pig
  2. PIG-1938

support project-range as udf argument

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.0
    • Fix Version/s: 0.9.0
    • Component/s: None
    • Labels:
      None

      Description

      With changes in PIG-1693, project-range ('..') is supported in all use cases where '*' (project-star) is supported, except as udf argument.
      To be consistent with usage of project-star, project-range should be supported as udf argument as well.

      1. PIG-1938.1.patch
        47 kB
        Thejas M Nair
      2. PIG-1938.2.patch
        51 kB
        Thejas M Nair

        Activity

        Hide
        Thejas M Nair added a comment -

        PIG-1938.1.patch - passes unit tests. test-patch showed additional javac warning, but that was from the code generated from antlr.

        Show
        Thejas M Nair added a comment - PIG-1938 .1.patch - passes unit tests. test-patch showed additional javac warning, but that was from the code generated from antlr.
        Hide
        Thejas M Nair added a comment -

        This patch also expands project-star and project-range expression within udf, in the query plan generation phase. The expanded argument schema for the udf gets used in typechecker. Earlier, there was an inconsistency in the behavior when project-star was used in the udf, the typechecker would see the udf having a single argument of type tuple, but at runtime the udf would get multiple arguments.
        This inconsistency has not been resolved for the case when schema of input relation is null. I will open another jira to address that.

        Show
        Thejas M Nair added a comment - This patch also expands project-star and project-range expression within udf, in the query plan generation phase. The expanded argument schema for the udf gets used in typechecker. Earlier, there was an inconsistency in the behavior when project-star was used in the udf, the typechecker would see the udf having a single argument of type tuple, but at runtime the udf would get multiple arguments. This inconsistency has not been resolved for the case when schema of input relation is null. I will open another jira to address that.
        Hide
        Thejas M Nair added a comment -

        PIG-1938.2.patch - Patch with additional test cases for statements other than foreach.

        Show
        Thejas M Nair added a comment - PIG-1938 .2.patch - Patch with additional test cases for statements other than foreach.
        Hide
        Daniel Dai added a comment -

        +1

        Show
        Daniel Dai added a comment - +1
        Hide
        Thejas M Nair added a comment -

        Patch committed to trunk and 0.9 branch.

        Show
        Thejas M Nair added a comment - Patch committed to trunk and 0.9 branch.

          People

          • Assignee:
            Thejas M Nair
            Reporter:
            Thejas M Nair
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development