enable rewrite on select materialized index with aggregate mode
fix mv not match because cast and alias name