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
What is the bug?
When unsupported function is included in a query, current execution engine has to fallback to legacy SQL engine to verify whether the function comes from OpenSearch core. For example, query including percentiles is not supported in V2 and falling back to old SQL engine. If the function is also unsupported in OpenSearch core, it will throw The following method is not supported in Schema: functionNotExisted. That is the current expected behaviour.
POST /_plugins/_sql
{
"query" : """ SELECT functionNotExisted(taxful_total_price) FROM opensearch_dashboards_sample_data_ecommerce"""
}
returns
{
"error": {
"reason": "There was internal problem at backend",
"details": "The following method is not supported in Schema: functionNotExisted",
"type": "UnsupportedOperationException"
},
"status": 500
}
However, when the response format set to CSV or JSON, the query will return results instead of throwing failure.
POST /_plugins/_sql?format=csv
{
"query" : """ SELECT functionNotExisted(taxful_total_price) FROM opensearch_dashboards_sample_data_ecommerce"""
}
POST /_plugins/_sql
{
"query" : """ SELECT functionNotExisted(taxful_total_price) FROM opensearch_dashboards_sample_data_ecommerce"""
}
POST /_plugins/_sql?format=csv
{
"query" : """ SELECT functionNotExisted(taxful_total_price) FROM opensearch_dashboards_sample_data_ecommerce"""
}
What is the expected behavior?
Whatever the format type set, the query should fail with readable message.
What is your host/environment?
Version [2.14.0, 3.0.0-SNAPSHOT]
Plugins [SQL]
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
When CVS or JSON format is set, CSVResultRestExecutor or ElasticDefaultRestExecutor will be used to handle the query instead of PrettyFormatRestExecutor, but only PrettyFormatRestExecutor have the logic to verify the field with a function currently.
The text was updated successfully, but these errors were encountered:
What is the bug?
When unsupported function is included in a query, current execution engine has to fallback to legacy SQL engine to verify whether the function comes from OpenSearch core. For example, query including
percentiles
is not supported in V2 and falling back to old SQL engine. If the function is also unsupported in OpenSearch core, it will throwThe following method is not supported in Schema: functionNotExisted
. That is the current expected behaviour.returns
However, when the response format set to CSV or JSON, the query will return results instead of throwing failure.
returns
How can one reproduce the bug?
Steps to reproduce the behavior:
What is the expected behavior?
Whatever the format type set, the query should fail with readable message.
What is your host/environment?
Do you have any screenshots?
If applicable, add screenshots to help explain your problem.
Do you have any additional context?
When CVS or JSON format is set,
CSVResultRestExecutor
orElasticDefaultRestExecutor
will be used to handle the query instead ofPrettyFormatRestExecutor
, but onlyPrettyFormatRestExecutor
have the logic to verify the field with a function currently.The text was updated successfully, but these errors were encountered: