Details
-
Sub-task
-
Status: Open
-
Major
-
Resolution: Unresolved
-
2.1-incubating
-
None
-
None
Description
When we introduce a temp table, we want to "transplant" the statistics from the original query tree representing the common subexpression to the new scan and its ancestors. This requires two mappings, one from the original tree to the temp table columns, the other from the temp table cols to the characteristic outputs of the MapValueIds above the temp scan.
While most of these mappings are done in terms of VEGRefs, the statistics use BaseColumns instead. Right now, we map the BaseColumns of single column stats to VEGRefs in the new tree. We might be able to do the same for MC stats. Or, alternatively, we may need to decided on specific BaseColumns to map to.
See methods Scan::synthEstLogProp() and MapValueIds::synthEstLogProp().