Description
We encountered the case where the output of logical plan and optimized plan were different in LogicalRDD (the difference was exprId for the case), led the situation that stats and constraints are out of sync with output attributes, eventually failed the query.
We should remap stats and constraints based on the output of logical plan, assuming that the output of logical plan and optimized plan are "slightly" different (e.g. exprId) but "semantically" same.