There is a bug of direct select mv with specified partitions. Planner will fail to find the mv column name. Because we need to create the LogicalOlapScan object using the given mv instead of the base table.
mysql> SELECT mv_id from part8 index mv1 partition p1;
ERROR 1105 (HY000): errCode = 2, detailMessage = Unknown column 'mv_id' in 'table list' in PROJECT clause
There is a bug of direct select mv with specified partitions. Planner will fail to find the mv column name. Because we need to create the LogicalOlapScan object using the given mv instead of the base table.
This pr is to fix this.
backport: https://github.com/apache/doris/pull/36817