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

The cardinality associated with a SelectNode is 0 even if its child node has a non-zero cardinality

    XMLWordPrintableJSON

    Details

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

      Description

      Consider the following nested SQL statement.

      EXPLAIN SELECT *
      FROM functional_parquet.alltypessmall WHERE 1 IN
      (SELECT int_col FROM functional_parquet.alltypestiny LIMIT 1);
      

      It seems that the cardinality of the SelectNode should be 1 instead of 0. Specifically, if we had executed

      compute stats functional_parquet.alltypestiny

      before issuing this SQL statement at the very beginning, the returned cardinality of this SelectNode would be 1 instead of 0. Not very sure if this is a bug. It looks like the cardinality of a SelectNode depends on whether there is stats information associated with its child node. The cardinality of a SelectNode would still be 0 even if its child node (ExchangeNode in this case) has a non-zero cardinality.

        Attachments

          Activity

            People

            • Assignee:
              tarmstrong Tim Armstrong
              Reporter:
              fangyurao Fang-Yu Rao
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: