From 8ce4af44a07e3fe2172fc570fa66856367d9d89e Mon Sep 17 00:00:00 2001 From: Paul McGuire Date: Sat, 14 Jul 2018 16:43:34 -0500 Subject: Wrong expression grouping in select_parser.py Results name "group_by_terms" was defined at the wrong level in the "having_expr", causing those names to be left out of the results. --- examples/select_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/select_parser.py') diff --git a/examples/select_parser.py b/examples/select_parser.py index f969f02..b619173 100644 --- a/examples/select_parser.py +++ b/examples/select_parser.py @@ -101,7 +101,7 @@ result_column = "*" | table_name + "." + "*" | Group(expr + Optional(Optional(AS select_core = (SELECT + Optional(DISTINCT | ALL) + Group(delimitedList(result_column))("columns") + Optional(FROM + join_source("from*")) + Optional(WHERE + expr("where_expr")) + - Optional(GROUP + BY + Group(delimitedList(ordering_term)("group_by_terms")) + + Optional(GROUP + BY + Group(delimitedList(ordering_term))("group_by_terms") + Optional(HAVING + expr("having_expr")))) select_stmt << (select_core + ZeroOrMore(compound_operator + select_core) + -- cgit v1.2.1