LogicalRareTopN.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.ast.tree.RareTopN.CommandType;
15
import org.opensearch.sql.expression.Expression;
16
17
/**
18
 * Logical Rare and TopN Plan.
19
 */
20
@Getter
21
@ToString
22
@EqualsAndHashCode(callSuper = true)
23
public class LogicalRareTopN extends LogicalPlan {
24
25
  private final CommandType commandType;
26
  private final Integer noOfResults;
27
  private final List<Expression> fieldList;
28
  private final List<Expression> groupByList;
29
30
  /**
31
   * Constructor of LogicalRareTopN.
32
   */
33
  public LogicalRareTopN(
34
      LogicalPlan child,
35
      CommandType commandType, Integer noOfResults,
36
      List<Expression> fieldList,
37
      List<Expression> groupByList) {
38
    super(Collections.singletonList(child));
39
    this.commandType = commandType;
40
    this.noOfResults = noOfResults;
41
    this.fieldList = fieldList;
42
    this.groupByList = groupByList;
43
  }
44
45
  @Override
46
  public <R, C> R accept(LogicalPlanNodeVisitor<R, C> visitor, C context) {
47 1 1. accept : replaced return value with null for org/opensearch/sql/planner/logical/LogicalRareTopN::accept → KILLED
    return visitor.visitRareTopN(this, context);
48
  }
49
}

Mutations

47

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/LogicalRareTopN::accept → KILLED

Active mutators

Tests examined


Report generated by PIT 1.9.0