redshift materialized views cannot contain mutable functions