Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
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.