Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-11432

Hive macro give same result for different arguments

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.3.0, 2.0.0
    • Component/s: None
    • Labels:
      None

      Description

      If you use hive macro more than once while processing same row, hive returns same result for all invocations even if the argument are different.
      Example :
      > CREATE TABLE macro_testing(
      a int,
      b int,
      c int)

      > select * from macro_testing;
      1 2 3
      4 5 6
      7 8 9
      10 11 12

      > create temporary macro math_square(x int)
      x*x;

      > select math_square(a), b, math_square(c) from macro_testing;
      9 2 9
      36 5 36
      81 8 81
      144 11 144

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                pxiong Pengcheng Xiong
                Reporter:
                mendax Jay Pandya
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: