File tree Expand file tree Collapse file tree 5 files changed +9
-9
lines changed
test/java/org/opensearch/sql/ppl Expand file tree Collapse file tree 5 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -306,7 +306,7 @@ topCommand
306306 ;
307307
308308rareCommand
309- : RARE (number = integerLiteral)? (COUNTFIELD EQUAL countfield = stringLiteral)? (SHOWCOUNT EQUAL showcount = booleanLiteral)? fieldList (byClause)?
309+ : RARE (( LIMIT EQUAL )? number = integerLiteral)? (COUNTFIELD EQUAL countfield = stringLiteral)? (SHOWCOUNT EQUAL showcount = booleanLiteral)? fieldList (byClause)?
310310 ;
311311
312312grokCommand
Original file line number Diff line number Diff line change 1212import org .opensearch .sql .ppl .parser .AstBuilder ;
1313
1414/** Base class for tests for the AST query planner. */
15- public class AstPlanningTest {
15+ public class AstPlanningTestBase {
1616 protected final Settings settings = Mockito .mock (Settings .class );
1717 protected final PPLSyntaxParser parser = new PPLSyntaxParser ();
1818
Original file line number Diff line number Diff line change 7676import org .opensearch .sql .ast .tree .RareTopN .CommandType ;
7777import org .opensearch .sql .common .antlr .SyntaxCheckException ;
7878import org .opensearch .sql .common .setting .Settings .Key ;
79- import org .opensearch .sql .ppl .AstPlanningTest ;
79+ import org .opensearch .sql .ppl .AstPlanningTestBase ;
8080import org .opensearch .sql .utils .SystemIndexUtils ;
8181
82- public class AstBuilderTest extends AstPlanningTest {
82+ public class AstBuilderTest extends AstPlanningTestBase {
8383
8484 @ Rule public ExpectedException exceptionRule = ExpectedException .none ();
8585
Original file line number Diff line number Diff line change 88import static org .junit .Assert .assertEquals ;
99
1010import org .junit .Test ;
11- import org .opensearch .sql .ppl .AstPlanningTest ;
11+ import org .opensearch .sql .ppl .AstPlanningTestBase ;
1212
13- public class AstEquivalenceTest extends AstPlanningTest {
13+ public class AstEquivalenceTest extends AstPlanningTestBase {
1414 @ Test
1515 public void testSpathArgumentDeshuffle () {
1616 assertEquals (plan ("source = t | spath path=a input=a" ), plan ("source = t | spath input=a a" ));
Original file line number Diff line number Diff line change 33 * SPDX-License-Identifier: Apache-2.0
44 */
55
6- package org .opensearch .sql .ppl .utils ;
6+ package org .opensearch .sql .ppl .rewrite ;
77
88import static org .junit .Assert .assertEquals ;
99import static org .opensearch .sql .ast .dsl .AstDSL .eval ;
1717import org .junit .Test ;
1818import org .opensearch .sql .ast .tree .Eval ;
1919import org .opensearch .sql .ast .tree .SPath ;
20- import org .opensearch .sql .ppl .AstPlanningTest ;
20+ import org .opensearch .sql .ppl .AstPlanningTestBase ;
2121
22- public class SPathRewriteTest extends AstPlanningTest {
22+ public class SpathRewriteTest extends AstPlanningTestBase {
2323 // Control test to make sure something fundamental hasn't changed about the json_extract parsing
2424 @ Test
2525 public void testEvalControl () {
You can’t perform that action at this time.
0 commit comments