Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query triggers Unexpected token '.' #71

Open
pvdz opened this issue Aug 25, 2021 · 2 comments
Open

Query triggers Unexpected token '.' #71

pvdz opened this issue Aug 25, 2021 · 2 comments

Comments

@pvdz
Copy link

pvdz commented Aug 25, 2021

Looks like an internal error on the following query (went sent raw, untransformed):

SELECT
  COUNT(1)
FROM (
  SELECT
    c.name
  FROM c
  WHERE
    c.name = 'READY'
) AS c
@southpolesteve
Copy link

Its worth noting that non-correlated sub queries are not supported in Cosmos https://docs.microsoft.com/en-us/azure/cosmos-db/sql/sql-query-subquery. These queries will return results, but if the sub query is cross partition or paginated the results will be incorrect

@pvdz
Copy link
Author

pvdz commented Aug 25, 2021

Good to know. To be fair, I was trying to craft a query that would expose a problem in a different library when I noticed that particular error message.

My suggestion is to catch it properly and return a semantic error for it. But if you're considering this out of scope because the query itself happens to be garbage then by all means just close the issue :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants