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
When using index alias instead of index name in JOIN query, NPE is thrown from SQL plugin.
What solution would you like?
JOIN query (or any SQL query) can handle index alias without issue.
Do you have any additional context?
Error stacktrace:
[2024-03-06T22:33:27,579][ERROR][o.o.s.l.p.RestSqlAction ] Client side error during query execution
java.lang.NullPointerException: Cannot invoke "org.opensearch.sql.legacy.esdomain.mapping.FieldMappings.has(String)" because "fieldMappings" is null
at org.opensearch.sql.legacy.rewriter.matchtoterm.TermFieldRewriter.visit(TermFieldRewriter.java:129)
at com.alibaba.druid.sql.ast.expr.SQLIdentifierExpr.accept0(SQLIdentifierExpr.java:65)
at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40)
at com.alibaba.druid.sql.ast.SQLObjectImpl.acceptChild(SQLObjectImpl.java:62)
at com.alibaba.druid.sql.ast.expr.SQLBinaryOpExpr.accept0(SQLBinaryOpExpr.java:99)
at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40)
at com.alibaba.druid.sql.ast.SQLObjectImpl.acceptChild(SQLObjectImpl.java:62)
at com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock.accept0(MySqlSelectQueryBlock.java:258)
at com.alibaba.druid.sql.dialect.mysql.ast.statement.MySqlSelectQueryBlock.accept0(MySqlSelectQueryBlock.java:246)
at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40)
at com.alibaba.druid.sql.ast.SQLObjectImpl.acceptChild(SQLObjectImpl.java:62)
at com.alibaba.druid.sql.ast.statement.SQLSelect.accept0(SQLSelect.java:85)
at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40)
at com.alibaba.druid.sql.ast.SQLObjectImpl.acceptChild(SQLObjectImpl.java:62)
at com.alibaba.druid.sql.ast.expr.SQLQueryExpr.accept0(SQLQueryExpr.java:55)
at com.alibaba.druid.sql.ast.SQLObjectImpl.accept(SQLObjectImpl.java:40)
at org.opensearch.sql.legacy.query.OpenSearchActionFactory.create(OpenSearchActionFactory.java:110)
at org.opensearch.sql.legacy.plugin.SearchDao.explain(SearchDao.java:52)
at org.opensearch.sql.legacy.plugin.RestSqlAction.explainRequest(RestSqlAction.java:208)
at org.opensearch.sql.legacy.plugin.RestSqlAction.lambda$prepareRequest$1(RestSqlAction.java:160)
at org.opensearch.sql.legacy.plugin.RestSQLQueryAction$1.onFailure(RestSQLQueryAction.java:130)
at org.opensearch.sql.sql.SQLService.explain(SQLService.java:60)
at org.opensearch.sql.legacy.plugin.RestSQLQueryAction.lambda$prepareRequest$2(RestSQLQueryAction.java:98)
...
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem?
When using index alias instead of index name in JOIN query, NPE is thrown from SQL plugin.
What solution would you like?
JOIN query (or any SQL query) can handle index alias without issue.
Do you have any additional context?
Error stacktrace:
The text was updated successfully, but these errors were encountered: