You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Null pointer error occurs if SHOW TABLES statement doesn't have a filter, such as LIKE xxx.
To Reproduce
Steps to reproduce the behavior:
POST http://localhost:9200/_plugins/_sql
{"query": "SHOW TABLES"}
{
"error": {
"reason": "Invalid SQL query",
"details": "Cannot invoke \"org.antlr.v4.runtime.tree.ParseTree.accept(org.antlr.v4.runtime.tree.ParseTreeVisitor)\" because \"tree\" is null",
"type": "NullPointerException"
},
"status": 400
}
Expected behavior
Syntax error is expected because the SHOW statement is illegal.
Host/Environment (please complete the following information):
OS: [e.g. iOS] MacOS
Version [e.g. 22] 1.0.0.0-rc1
Additional context
Error stack captured in logs:
[2021-06-30T15:49:51,431][INFO ][o.o.s.l.p.RestSqlAction ] Incoming request /_plugins/_sql: SHOW TABLES
[2021-06-30T15:49:51,478][ERROR][o.o.s.l.p.RestSqlAction ] Client side error during query execution
java.lang.NullPointerException: Cannot invoke "org.antlr.v4.runtime.tree.ParseTree.accept(org.antlr.v4.runtime.tree.ParseTreeVisitor)" because "tree" is null
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visit(AbstractParseTreeVisitor.java:18) ~[antlr4-runtime-4.7.1.jar:4.7.1]
at org.opensearch.sql.sql.parser.AstBuilder.visitAstExpression(AstBuilder.java:214) ~[sql-1.0.0.0-rc1.jar:?]
at org.opensearch.sql.sql.parser.AstBuilder.visitShowStatement(AstBuilder.java:87) ~[sql-1.0.0.0-rc1.jar:?]
at org.opensearch.sql.sql.parser.AstBuilder.visitShowStatement(AstBuilder.java:69) ~[sql-1.0.0.0-rc1.jar:?]
at org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser$ShowStatementContext.accept(OpenSearchSQLParser.java:546) ~[sql-1.0.0.0-rc1.jar:?]
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46) ~[antlr4-runtime-4.7.1.jar:4.7.1]
at org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor.visitAdminStatement(OpenSearchSQLParserBaseVisitor.java:48) ~[sql-1.0.0.0-rc1.jar:?]
at org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser$AdminStatementContext.accept(OpenSearchSQLParser.java:485) ~[sql-1.0.0.0-rc1.jar:?]
at org.antlr.v4.runtime.tree.AbstractParseTreeVisitor.visitChildren(AbstractParseTreeVisitor.java:46) ~[antlr4-runtime-4.7.1.jar:4.7.1]
at org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParserBaseVisitor.visitSqlStatement(OpenSearchSQLParserBaseVisitor.java:27) ~[sql-1.0.0.0-rc1.jar:?]
at org.opensearch.sql.sql.antlr.parser.OpenSearchSQLParser$SqlStatementContext.accept(OpenSearchSQLParser.java:325)
...
The text was updated successfully, but these errors were encountered:
Describe the bug
Null pointer error occurs if SHOW TABLES statement doesn't have a filter, such as
LIKE xxx
.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Syntax error is expected because the SHOW statement is illegal.
Host/Environment (please complete the following information):
Additional context
Error stack captured in logs:
The text was updated successfully, but these errors were encountered: