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
case-3, ```source=accounts,account2 | stats count(); / select count from `accounts,account2````
The OpenSearch _search API supports comma-separated lists of indices, wildcard (*) expressions, and table relations in the source and from clauses, following the same conventions. This applies to both OpenSearch SQL and PPL. However, the case-2 grammar contradicts the SQL comma join syntax.
What solution would you like?
I propose a nameing conveing to map opensearch index to table relation.
You can use a comma-separated list indices, remote index as table relation, for instance index1,remote:test2,test3. Index name could also include wildcard () and question mark (?) to target index that match a pattern: index?, ind.
In SQL and PPL, if a table name or relation includes special characters (e.g., ','), it should be enclosed in backticks (`).
But PPL on Spark supports the first two currently.
I think the third one (wildcard) should be supported in PPL on Spark too. But I would suggest to mark the fourth one as invalid since users will treat the content in backticks as a whole as usual. We have some examples from real, users from CloudWatch provided a table pattern:
`_CWLBasic`.default.`Canary/service.log`
And quote their requests:
So if query is select a.b.Service.Log where service.log is table name I am sure sql will also split everything by dot and consider only Log as table name while preceding stuff as namespace. However any entity enclosed in backticks sql considers as a single entity. So if query is select a.b.’Service.log’ where table name is enclosed in backticks sql will only consider a and b as name space and ignore everything which is within backticks
So I think sql considers everything enclosed in backticks as a single entity. `Canary/service.log` should be one whole.
My suggestion is treating content in backticks as a whole. For instance:
Is your feature request related to a problem?
Currently, OpenSearch SQL/PPL support query multiple indices. for instance
accounts,account2
| stats count(); / select count from `accounts,account2````The OpenSearch _search API supports comma-separated lists of indices, wildcard (*) expressions, and table relations in the source and from clauses, following the same conventions. This applies to both OpenSearch SQL and PPL. However, the case-2 grammar contradicts the SQL comma join syntax.
Related issue, #51
Early discussion, opensearch-project/opensearch-spark#775
What solution would you like?
I propose a nameing conveing to map opensearch index to table relation.
You can use a comma-separated list indices, remote index as table relation, for instance index1,remote:test2,test3. Index name could also include wildcard () and question mark (?) to target index that match a pattern: index?, ind.
In SQL and PPL, if a table name or relation includes special characters (e.g., ','), it should be enclosed in backticks (`).
The text was updated successfully, but these errors were encountered: