Planning grouping sets queries with grouping() function failed with
ERROR: XX000: unrecognized node type: 307
LOCATION: pgxc_shippability_walker, pgxcship.c:1199
STATEMENT: select grouping(a, b), count(*) from t1
group by grouping sets ((a), (b));
We simply inspect arguments of the grouping() function, although
that probably is not necessary - it can only reference grouping
expressions, which are checked as part of other nodes.
}
break;
+ case T_GroupingFunc:
+ /*
+ * Let expression tree walker inspect the arguments. Not sure if
+ * that's necessary, as those are just references to grouping
+ * expressions of the query (and thus likely examined as part
+ * of another node).
+ */
+ return expression_tree_walker(node, pgxc_shippability_walker,
+ sc_context);
+
default:
elog(ERROR, "unrecognized node type: %d",
(int) nodeTag(node));