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

[Umbrella] Support PREPARE and EXECUTE statements

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • Query Planning
    • None

    Description

      PREPARE and EXECUTE statements provide an ability to create a parameterized query and re-use it to execute with different parameters.

      e.g.

      PREPARE pcount from 
          select count(*) from src where key > ?;
      EXECUTE pcount using 200;
      
      -- execute with different value
      EXECUTE pcount using 101;
      
      
      PREPARE pquery2 from 
         select count(*) from daysales where dt=? and customer=?;
      EXECUTE pquery2 using '2001-01-01',1;
      

      Attachments

        Activity

          People

            vgarg Vineet Garg
            vgarg Vineet Garg
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 7h 20m
                7h 20m