When someone projects an expression from values node, we should be able to inline and simplify those into the value node itself. Today we don't do that:
So we should pushdown the project nodes into the values clause and simplfiy the expression so that other rules can take advantage of this. Rouhgly we want to make the above to be:
select x from (values substr('abcd',1,2), substr('efgh',1,2)) AS T(x)
When someone projects an expression from values node, we should be able to inline and simplify those into the value node itself. Today we don't do that:
So we should pushdown the project nodes into the values clause and simplfiy the expression so that other rules can take advantage of this. Rouhgly we want to make the above to be:
CC: @feilong-liu