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

[feature request] Support of IN clause in query #5626

Closed
pribiswas opened this issue Feb 11, 2016 · 6 comments
Closed

[feature request] Support of IN clause in query #5626

pribiswas opened this issue Feb 11, 2016 · 6 comments

Comments

@pribiswas
Copy link

Suppose I have following points in influxdb:
{account_id: 1, user_id: 1}
{account_id: 2, user_id: 2}
{account_id: 3, user_id: 3}

I just want to select those points where account_id belongs to [1, 2, 3]. Something like:
SELECT * FROM my_series WHERE account_id IN ('1', '2', '3')

Looks like IN CLAUSE is not supported in influx QL. I am using v0.10.0. Is there any plan to support IN clause in future?

@cmdrSpectral
Copy link

+1

@rossmcdonald
Copy link
Contributor

@pribiswas I don't believe there are currently any plans to add support for the IN clause, but I'll file this as a feature request.

@rossmcdonald rossmcdonald changed the title Support of IN clause in query [feature request] Support of IN clause in query Feb 11, 2016
@cxreg
Copy link

cxreg commented Feb 18, 2016

+1 from me too, this would be huge. you can do it with a regex and alternations, but it's clunky and probably doesn't make use of the index. For example

SELECT * FROM my_series WHERE account_id =~ /^1$|^2$|^3$/

@cxreg
Copy link

cxreg commented Feb 19, 2016

https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/influxdb/wjawZZ0RFRE/cydIk0xPZCIJ seems to confirm my notion that this is unindexed. I would hope and expect that an IN() version would indeed make use of the index here

@jsternberg
Copy link
Contributor

Closing as a duplicate of #2157.

@ishita07-danaher
Copy link

Hi..I was trying to implement something similar using both reg ex and 'OR' .
Where these approaches fail :

Reg ex : if the value I have passed is contained in the column value, it reads that though it shouldn't. Reg ex is similar to 'contains'..I want to compare the exact same value.

OR : I want data for both values not either of them.

Please suggest another approach for IN clause.

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

6 participants