Add testcase for query rewriting with timerangewriter options