org.apache.spark.sql.catalyst.plans.logical.statsEstimation
Check if each attribute has column stat in the corresponding statistics.
Get column stats for output attributes.
Check if each plan has rowCount in its statistics.
For simplicity we use Decimal to unify operations for data types whose min/max values can be represented as numbers, e.g.
For simplicity we use Decimal to unify operations for data types whose min/max values can be represented as numbers, e.g. Boolean can be represented as 0 (false) or 1 (true). The two methods below are the contract of conversion.
Updates (scales down) the number of distinct values if the number of rows decreases after some operation (such as filter, join).
Updates (scales down) the number of distinct values if the number of rows decreases after some operation (such as filter, join). Otherwise keep it unchanged.