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.apache.commons.lang3.tuple.Pair; | |
15 | import org.opensearch.sql.ast.tree.Sort.SortOption; | |
16 | import org.opensearch.sql.expression.Expression; | |
17 | ||
18 | /** | |
19 | * Sort Plan. | |
20 | */ | |
21 | @Getter | |
22 | @ToString | |
23 | @EqualsAndHashCode(callSuper = true) | |
24 | public class LogicalSort extends LogicalPlan { | |
25 | ||
26 | private final List<Pair<SortOption, Expression>> sortList; | |
27 | ||
28 | /** | |
29 | * Constructor of LogicalSort. | |
30 | */ | |
31 | public LogicalSort( | |
32 | LogicalPlan child, | |
33 | List<Pair<SortOption, Expression>> sortList) { | |
34 | super(Collections.singletonList(child)); | |
35 | this.sortList = sortList; | |
36 | } | |
37 | ||
38 | @Override | |
39 | public <R, C> R accept(LogicalPlanNodeVisitor<R, C> visitor, C context) { | |
40 |
1
1. accept : replaced return value with null for org/opensearch/sql/planner/logical/LogicalSort::accept → KILLED |
return visitor.visitSort(this, context); |
41 | } | |
42 | } | |
Mutations | ||
40 |
1.1 |