optimizer check support rewrite