Skip to content

Commit 9240c00

Browse files
committed
chen remove the check for implicit join
Signed-off-by: Jialiang Liang <[email protected]>
1 parent 5f4e1f6 commit 9240c00

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

legacy/src/main/java/org/opensearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitor.java

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -290,21 +290,6 @@ public Boolean visitTableSourceBase(TableSourceBaseContext ctx) {
290290
return !ctx.joinPart().isEmpty();
291291
}
292292

293-
@Override
294-
public Boolean visitTableSources(TableSourcesContext ctx) {
295-
if (ctx.tableSource().size() > 1) {
296-
return true;
297-
}
298-
299-
for (int i = 0; i < ctx.tableSource().size(); i++) {
300-
Boolean hasJoinInTableSource = visit(ctx.tableSource(i));
301-
if (hasJoinInTableSource != null && hasJoinInTableSource) {
302-
return true;
303-
}
304-
}
305-
return false;
306-
}
307-
308293
@Override
309294
protected Boolean defaultResult() {
310295
return false;

legacy/src/test/java/org/opensearch/sql/legacy/antlr/visitor/AntlrSqlParseTreeVisitorTest.java

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -107,13 +107,6 @@ public void visitFunctionAsAggregatorShouldThrowException() {
107107
visit("SELECT max(abs(age)) FROM test");
108108
}
109109

110-
@Test
111-
public void visitImplicitJoinWithGroupByShouldThrowException() {
112-
exceptionRule.expect(RuntimeException.class);
113-
exceptionRule.expectMessage("JOIN queries do not support aggregations on the joined result.");
114-
visit("SELECT COUNT(*) FROM testIndex t1, testIndex t2 WHERE t1.id = t2.id GROUP BY t1.field");
115-
}
116-
117110
@Test
118111
public void visitExplicitJoinWithGroupByShouldThrowException() {
119112
exceptionRule.expect(RuntimeException.class);

0 commit comments

Comments
 (0)