@Test
public void testQ14Regression() throws Exception {
String query = "select x, y, z from ( select customer_region_id, fname, avg(total_children) "
+ "from cp.\"customer.json\" group by customer_region_id, fname) as sq(x, y, z) where coalesce(x, 100) = 10";
testPlanMatchingPatterns(query, new String[] {
"Filter\\(condition=\\[CASE\\(IS NOT NULL\\(\\$1\\), =\\(\\$1, 10\\), false\\)\\]\\)",
"Agg\\(group=\\[\\{0, 1\\}\\], agg\\#0=\\[\\SUM\\(\\$2\\)\\], agg\\#1=\\[COUNT\\(\\$2\\)\\]\\)",
"Project\\(customer_region_id=\\[\\$0\\], fname=\\[\\$1\\], EXPR\\$2=\\[\\/\\(CAST\\(\\$2\\):DOUBLE, \\$3\\)\\]\\)" },
null);
}