Add interfaces for query rewrite.