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

Invalid stats after multi inserting into the same partition

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • None
    • Statistics

    Description

      create table source(p int, key int,value string);
      insert into source(p, key, value) values (101,42,'string42');
      
      create table stats_part(key int,value string) partitioned by (p int);
      
      from source
      insert into stats_part select key, value, p
      insert into stats_part select key, value, p;
      
      select count(*) from stats_part;
      

      In this case StatsOptimizer helps serving this query because the result should be rowNum of the partition p=101. The result is

      1
      

      however it shloud be

      2
      

      because both insert branches inserts 1-1 records.

      Attachments

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              kkasa Krisztian Kasa
              Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 3h 40m
                  3h 40m