ProjectMergeRule currently refuses to reduce identity projects if the
fields have different names.
For instance suppose you have a table Dept (deptno, name) and the algebra
2: Project($1 as X, $0 as Y)
1: Project($1, $0)
0: Scan(Dept)
Observe that if you combine projects #1 and #2 you end up with
3: Project($0 as X, $1 as Y)
0: Scan(Dept)
Although the new project (#3) is an identity, it renames the fields.
ProjectMergeRule will return the new project (#3), but it could return
Scan(Dept) (#0).
Does anyone think they will break if I make it return #0?
Julian