LogicalAggregation.java

1
/*
2
 * Copyright OpenSearch Contributors
3
 * SPDX-License-Identifier: Apache-2.0
4
 */
5
6
7
package org.opensearch.sql.planner.logical;
8
9
import java.util.Collections;
10
import java.util.List;
11
import lombok.EqualsAndHashCode;
12
import lombok.Getter;
13
import lombok.ToString;
14
import org.opensearch.sql.expression.NamedExpression;
15
import org.opensearch.sql.expression.aggregation.NamedAggregator;
16
17
/**
18
 * Logical Aggregation.
19
 */
20
@ToString
21
@EqualsAndHashCode(callSuper = true)
22
public class LogicalAggregation extends LogicalPlan {
23
24
  @Getter
25
  private final List<NamedAggregator> aggregatorList;
26
27
  @Getter
28
  private final List<NamedExpression> groupByList;
29
30
  /**
31
   * Constructor of LogicalAggregation.
32
   */
33
  public LogicalAggregation(
34
      LogicalPlan child,
35
      List<NamedAggregator> aggregatorList,
36
      List<NamedExpression> groupByList) {
37
    super(Collections.singletonList(child));
38
    this.aggregatorList = aggregatorList;
39
    this.groupByList = groupByList;
40
  }
41
42
  @Override
43
  public <R, C> R accept(LogicalPlanNodeVisitor<R, C> visitor, C context) {
44 1 1. accept : replaced return value with null for org/opensearch/sql/planner/logical/LogicalAggregation::accept → KILLED
    return visitor.visitAggregation(this, context);
45
  }
46
}

Mutations

44

1.1
Location : accept
Killed by : org.opensearch.sql.planner.logical.LogicalPlanNodeVisitorTest.[engine:junit-jupiter]/[class:org.opensearch.sql.planner.logical.LogicalPlanNodeVisitorTest]/[method:logicalPlanShouldTraversable()]
replaced return value with null for org/opensearch/sql/planner/logical/LogicalAggregation::accept → KILLED

Active mutators

Tests examined


Report generated by PIT 1.9.0