Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-7895

Incorrect expected results for spillable-buffer-sizing.test

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Impala 3.0
    • Fix Version/s: Impala 3.2.0
    • Component/s: Frontend
    • Labels:
      None
    • Epic Color:
      ghx-label-3

      Description

      A recent change appears to have caused a test to expect the wrong rewritten SQL in spillable-buffer-sizing.test.

      # Mid NDV aggregation - should scale down buffers to intermediate size.
      select straight_join l_orderkey, o_orderstatus, count(*)
      from tpch_parquet.lineitem
          join tpch_parquet.orders on o_orderkey = l_orderkey
      group by 1, 2
      having count(*) = 1
      ---- DISTRIBUTEDPLAN
      Max Per-Host Resource Reservation: Memory=82.00MB Threads=7
      Per-Host Resource Estimates: Memory=244MB
      Analyzed query: SELECT 
      -- +straight_join
      l_orderkey, o_orderstatus, count(*) FROM tpch_parquet.lineitem INNER JOIN
      tpch_parquet.orders ON o_orderkey = l_orderkey GROUP BY CAST(1 AS INVALID_TYPE),
      CAST(2 AS INVALID_TYPE) HAVING count(*) = CAST(1 AS BIGINT)
      

      Correct rewritten SQL:

      Analyzed query: SELECT 
      -- +straight_join
      l_orderkey, o_orderstatus, count(*) FROM tpch_parquet.lineitem INNER JOIN
      tpch_parquet.orders ON o_orderkey = l_orderkey GROUP BY l_orderkey,
      o_orderstatus HAVING count(*) = CAST(1 AS BIGINT)
      

      The same problem occurs in max-rows-test.test.

      The problem is due to the existence of two copies of the grouping expressions. The toSql() function used the original, unanalyzed copy, not the rewritten copy with ordinal replacements.

        Attachments

          Activity

            People

            • Assignee:
              Paul.Rogers Paul Rogers
              Reporter:
              Paul.Rogers Paul Rogers

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment