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

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • None
    • Impala 3.4.0
    • Frontend
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: