make OptimizeCommand compile views
Merge pull request #4565 from alprs/feature/optimize-compile-views

Make OptimizeCommand compile views