Skip to content

Commit 40dd899

Browse files
author
MaxKsyunz
committed
Merge branch 'main' into feature/pagination/integ
Signed-off-by: MaxKsyunz <[email protected]> # Conflicts: # opensearch/src/main/java/org/opensearch/sql/opensearch/request/OpenSearchRequestBuilder.java # opensearch/src/test/java/org/opensearch/sql/opensearch/request/OpenSearchRequestBuilderTest.java
2 parents 53f2271 + 6d796ee commit 40dd899

File tree

15 files changed

+849
-55
lines changed

15 files changed

+849
-55
lines changed

core/src/main/java/org/opensearch/sql/analysis/Analyzer.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,6 @@ public LogicalPlan visitLimit(Limit node, AnalysisContext context) {
225225
public LogicalPlan visitFilter(Filter node, AnalysisContext context) {
226226
LogicalPlan child = node.getChild().get(0).accept(this, context);
227227
Expression condition = expressionAnalyzer.analyze(node.getCondition(), context);
228-
verifySupportsCondition(condition);
229228

230229
ExpressionReferenceOptimizer optimizer =
231230
new ExpressionReferenceOptimizer(expressionAnalyzer.getRepository(), child);
@@ -234,7 +233,7 @@ public LogicalPlan visitFilter(Filter node, AnalysisContext context) {
234233
}
235234

236235
/**
237-
* Ensure NESTED function is not used in WHERE, GROUP BY, and HAVING clauses.
236+
* Ensure NESTED function is not used in GROUP BY, and HAVING clauses.
238237
* Fallback to legacy engine. Can remove when support is added for NESTED function in WHERE,
239238
* GROUP BY, ORDER BY, and HAVING clauses.
240239
* @param condition : Filter condition

core/src/test/java/org/opensearch/sql/analysis/AnalyzerTest.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,29 +1048,6 @@ public void nested_group_by_clause_throws_syntax_exception() {
10481048
exception.getMessage());
10491049
}
10501050

1051-
/**
1052-
* Ensure Nested function falls back to legacy engine when used in WHERE clause.
1053-
* TODO Remove this test when support is added.
1054-
*/
1055-
@Test
1056-
public void nested_where_clause_throws_syntax_exception() {
1057-
SyntaxCheckException exception = assertThrows(SyntaxCheckException.class,
1058-
() -> analyze(
1059-
AstDSL.filter(
1060-
AstDSL.relation("schema"),
1061-
AstDSL.equalTo(
1062-
AstDSL.function("nested", qualifiedName("message", "info")),
1063-
AstDSL.stringLiteral("str")
1064-
)
1065-
)
1066-
)
1067-
);
1068-
assertEquals("Falling back to legacy engine. Nested function is not supported in WHERE,"
1069-
+ " GROUP BY, and HAVING clauses.",
1070-
exception.getMessage());
1071-
}
1072-
1073-
10741051
/**
10751052
* SELECT name, AVG(age) FROM test GROUP BY name.
10761053
*/

docs/dev/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
+ **SQL**
3737
+ [Aggregate Window Function](sql-aggregate-window-function.md): aggregate window function support
3838
+ [Nested Function In Select Clause](sql-nested-function-select-clause.md): Nested function support in sql select clause
39+
+ [Nested Function In Where Clause](sql-nested-function-where-clause.md): Nested function support in sql where clause
3940
+ **Piped Processing Language**
4041

4142
### Query Processing

0 commit comments

Comments
 (0)