XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 4.0.0-alpha-1
    • None
    • None

    Description

      Example:

      Client Execution succeeded but contained differences (error code = 1) after executing topnkey_grouping_sets.q 
      260c260
      < NULL NULL
      ---
      > NULL 1
      

       

      Test topnkey_grouping_sets fails intermittently.

      Queries which project 2 columns but order by only one of them can have more than one good result set:

      CREATE TABLE t_test_grouping_sets(
        a int,
        b int,
        c int
      );
      
      INSERT INTO t_test_grouping_sets VALUES
      (NULL, NULL, NULL),
      (5, 2, 3),
      (10, 11, 12),
      (NULL, NULL, NULL),
      (NULL, NULL, NULL),
      (6, 2, 1),
      (7, 8, 4), (7, 8, 4), (7, 8, 4),
      (5, 1, 2), (5, 1, 2), (5, 1, 2),
      (NULL, NULL, NULL);
      
      SELECT a, b FROM t_test_grouping_sets GROUP BY GROUPING SETS ((a, b), (a), (b), ()) ORDER BY a LIMIT 10;
      
      5	NULL
      5	2
      5	1
      6	2
      6	NULL
      7	8
      7	NULL
      10	NULL
      10	11
      NULL	1
      
      5	NULL
      5	2
      5	1
      6	2
      6	NULL
      7	8
      7	NULL
      10	NULL
      10	11
      NULL	NULL
      

      Since we don't order by b both result sets are valid.

      Attachments

        1. HIVE-23101.1.patch
          89 kB
          Krisztian Kasa
        2. HIVE-23101.2.patch
          90 kB
          Krisztian Kasa

        Issue Links

          Activity

            People

              kkasa Krisztian Kasa
              kkasa Krisztian Kasa
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: