Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-10924 add support for MERGE statement
  3. HIVE-15307

Hive MERGE: "when matched then update" allows invalid column names.

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.2.0
    • 2.2.0
    • Transactions
    • None

    Description

      create table target (
        id int, val int
      )
      CLUSTERED BY (id) INTO 2 BUCKETS STORED AS ORC TBLPROPERTIES ("transactional"="true");
      
      create table source2 (
        id int, val int
      );
      insert into source2 values (2, 25), (3, 35), (4, 45);
      
      merge into target
      using source2 sub on sub.id = target.id
      when matched then update set invalid = sub.val;
      

      Attachments

        1. HIVE-15307.01.patch
          10 kB
          Eugene Koifman
        2. HIVE-15307.02.patch
          12 kB
          Eugene Koifman

        Activity

          People

            ekoifman Eugene Koifman
            ekoifman Eugene Koifman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: