forked from opensearch-project/opensearch-spark
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
top [N] <field-list> [by-clause] N: number of results to return. Default: 10 field-list: mandatory. comma-delimited list of field names. by-clause: optional. one or more fields to group the results by. ------------------------------------------------------------------------------------------- rare <field-list> [by-clause] field-list: mandatory. comma-delimited list of field names. by-clause: optional. one or more fields to group the results by. ------------------------------------------------------------------------------------------- commands: - opensearch-project#461 - opensearch-project#536 Signed-off-by: YANGDB <[email protected]>
- Loading branch information
Showing
4 changed files
with
90 additions
and
17 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
ppl-spark-integration/src/main/java/org/opensearch/sql/ast/tree/RareAggregation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.sql.ast.tree; | ||
|
||
import org.opensearch.sql.ast.expression.UnresolvedExpression; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
/** Logical plan node of Rare (Aggregation) command, the interface for building aggregation actions in queries. */ | ||
public class RareAggregation extends Aggregation { | ||
/** Aggregation Constructor without span and argument. */ | ||
public RareAggregation( | ||
List<UnresolvedExpression> aggExprList, | ||
List<UnresolvedExpression> sortExprList, | ||
List<UnresolvedExpression> groupExprList) { | ||
super(aggExprList, sortExprList, groupExprList, null, Collections.emptyList()); | ||
} | ||
|
||
} |
23 changes: 23 additions & 0 deletions
23
ppl-spark-integration/src/main/java/org/opensearch/sql/ast/tree/TopAggregation.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/* | ||
* Copyright OpenSearch Contributors | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
|
||
package org.opensearch.sql.ast.tree; | ||
|
||
import org.opensearch.sql.ast.expression.UnresolvedExpression; | ||
|
||
import java.util.Collections; | ||
import java.util.List; | ||
|
||
/** Logical plan node of Top (Aggregation) command, the interface for building aggregation actions in queries. */ | ||
public class TopAggregation extends Aggregation { | ||
/** Aggregation Constructor without span and argument. */ | ||
public TopAggregation( | ||
List<UnresolvedExpression> aggExprList, | ||
List<UnresolvedExpression> sortExprList, | ||
List<UnresolvedExpression> groupExprList) { | ||
super(aggExprList, sortExprList, groupExprList, null, Collections.emptyList()); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters