Fix the serial aggregate optimization with materialized view