Added test case to demo the issue of incorrect complex query handling