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

SQL query fails in semi join when using NOT IN with subquery #8833

Open
stelios313 opened this issue Nov 6, 2019 · 1 comment
Open

SQL query fails in semi join when using NOT IN with subquery #8833

stelios313 opened this issue Nov 6, 2019 · 1 comment

Comments

@stelios313
Copy link

Affected Version

0.16.0

Description

Executing an SQL query from UI,

SELECT dimension, SUM(totals)
FROM datasource
WHERE "__time" BETWEEN TIME_FORMAT(TIMESTAMPADD(DAY, -2,CURRENT_DATE), 'yyyy-MM-dd hh:mm:ss') 
AND TIME_FORMAT(TIMESTAMPADD(DAY, -1,CURRENT_DATE), 'yyyy-MM-dd hh:mm:ss')
AND dimension NOT IN (
  SELECT dimension from datasource1 WHERE d="example"
)
GROUP BY dimension

Gets me:

Unknown exception / Cannot build plan for query:  

followed by the original query.

The exact same query works when i use IN keyword.

@vogievetsky
Copy link
Contributor

This is a known issues the x IN (...) is actually a special case, this will be addressed by #8728

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

No branches or pull requests

2 participants