Utility method to convert project expressions into RexProgram. Minor changes to materialized views.