append(indent, "GROUP BY " + (node.getGroupBy().get().isDistinct() ? " DISTINCT " : "") + formatGroupBy(node.getGroupBy().get().getGroupingElements())).append('\n');
@Override protected R visitGroupBy(GroupBy node, C context) { for (GroupingElement groupingElement : node.getGroupingElements()) { process(groupingElement, context); } return null; }
@Override public Node visitGroupBy(SqlBaseParser.GroupByContext context) { return new GroupBy(getLocation(context), isDistinct(context.setQuantifier()), visit(context.groupingElement(), GroupingElement.class)); }
columnOnlyGroupingSets = enumerateGroupingSets(groupingSetAnalysis); if (node.getGroupBy().get().isDistinct()) { columnOnlyGroupingSets = columnOnlyGroupingSets.stream() .distinct()
@Override protected R visitGroupBy(GroupBy node, C context) { for (GroupingElement groupingElement : node.getGroupingElements()) { process(groupingElement, context); } return null; }
@Override public Node visitGroupBy(SqlBaseParser.GroupByContext context) { return new GroupBy(getLocation(context), isDistinct(context.setQuantifier()), visit(context.groupingElement(), GroupingElement.class)); }
columnOnlyGroupingSets = enumerateGroupingSets(groupingSetAnalysis); if (node.getGroupBy().get().isDistinct()) { columnOnlyGroupingSets = columnOnlyGroupingSets.stream() .distinct()
append(indent, "GROUP BY " + (node.getGroupBy().get().isDistinct() ? " DISTINCT " : "") + formatGroupBy(node.getGroupBy().get().getGroupingElements())).append('\n');
for (GroupingElement element : node.getGroupingElements()) { try { int product;
Optional.of(new Table(QualifiedName.of("table1"))), Optional.empty(), Optional.of(new GroupBy(false, ImmutableList.of(new SimpleGroupBy(ImmutableList.of(new Identifier("a")))))), Optional.empty(), Optional.empty(), Optional.of(new Table(QualifiedName.of("table1"))), Optional.empty(), Optional.of(new GroupBy(false, ImmutableList.of( new SimpleGroupBy(ImmutableList.of(new Identifier("a"))), new SimpleGroupBy(ImmutableList.of(new Identifier("b")))))), Optional.of(new Table(QualifiedName.of("table1"))), Optional.empty(), Optional.of(new GroupBy(false, ImmutableList.of(new SimpleGroupBy(ImmutableList.of())))), Optional.empty(), Optional.empty(), Optional.of(new Table(QualifiedName.of("table1"))), Optional.empty(), Optional.of(new GroupBy(false, ImmutableList.of(new GroupingSets(ImmutableList.of(ImmutableList.of(new Identifier("a"))))))), Optional.empty(), Optional.empty(), Optional.of(new Table(QualifiedName.of("table1"))), Optional.empty(), Optional.of(new GroupBy(false, ImmutableList.of(new GroupingSets(ImmutableList.of(ImmutableList.of(new Identifier("a")), ImmutableList.of(new Identifier("b"))))))), Optional.empty(), Optional.empty(),
if (node.getGroupBy().get().isDistinct()) { distinct = "[DISTINCT]"; for (GroupingElement groupingElement : node.getGroupBy().get().getGroupingElements()) { print(indentLevel, "SimpleGroupBy"); if (groupingElement instanceof SimpleGroupBy) {
for (GroupingElement element : node.getGroupingElements()) { try { int product;
if (node.getGroupBy().get().isDistinct()) { distinct = "[DISTINCT]"; for (GroupingElement groupingElement : node.getGroupBy().get().getGroupingElements()) { print(indentLevel, "SimpleGroupBy"); if (groupingElement instanceof SimpleGroupBy) {
for (GroupingElement groupingElement : node.getGroupBy().get().getGroupingElements()) { if (groupingElement instanceof SimpleGroupBy) { for (Expression column : groupingElement.getExpressions()) {
for (GroupingElement groupingElement : node.getGroupBy().get().getGroupingElements()) { if (groupingElement instanceof SimpleGroupBy) { for (Expression column : groupingElement.getExpressions()) {