Uploaded image for project: 'Hive'
  1. Hive
  2. HIVE-21158 Perform update split early
  3. HIVE-21172

DEFAULT keyword handling in MERGE UPDATE clause issues

    XMLWordPrintableJSON

Details

    Description

      once HIVE-21159 lands, enable HiveConf.MERGE_SPLIT_UPDATE and run these tests.

      TestMiniLlapLocalCliDriver.testCliDriver[sqlmerge_stats]
      mvn test -Dtest=TestMiniLlapLocalCliDriver -Dqfile=insert_into_default_keyword.q

      Merge is rewritten as a multi-insert. When Update clause has DEFAULT, it's not properly replaced with a value in the muli-insert - it's treated as a literal

      INSERT INTO `default`.`acidTable`    -- update clause(insert part)
       SELECT `t`.`key`, `DEFAULT`, `t`.`value`
         WHERE `t`.`key` = `s`.`key` AND `s`.`key` > 3 AND NOT(`s`.`key` < 3)
      

      See LOG.info("Going to reparse <" + originalQuery + "> as \n<" + rewrittenQueryStr.toString() + ">"); in hive.log

      MergeSemanticAnalyzer.replaceDefaultKeywordForMerge() is only called in handleInsert but not handleUpdate(). Why does issue only show up with MERGE_SPLIT_UPDATE?

      Once this is fixed, HiveConf.MERGE_SPLIT_UPDATE should be true by default

      Attachments

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              ekoifman Eugene Koifman
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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