-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Inequalities in the SELECT clause should return a parse error #3525
Comments
Can you give an example query? |
Sorry I forgot to provide one.
|
ok, this should actually be a different bug. That query is invalid. Inequalities are only valid in the What you should get if you enter a query like that is an error. Updating the title of the bug |
Some what related:
causes panic
|
Binary expressions that yield a boolean are invalid and we can catch these at parse time. Fixes influxdata#3525
I think that something like
should be a possible ( and useful) query, quite different from
The first will tell me, for every time bucket I can group on, if some condition is met or not, while the latter will return me only values (and timestamps) when it was met or not. |
@RobMcZag I don't understand the difference. A query like If you disagree, please open a new GitHub Issue describing your use case, and demonstrating how existing queries are insufficient. |
@beckettsean sorry to reply so late, Just got now the notification. The first query will return, for every interval, if the predicate is true or false; I think the two are quite different, as the first will give you the desired value on a completely filled time dimension, while the second will usually return a fragmented time dimension. The first is much easier to use to graph the result or to take different action for every interval (you already have all of them and you can just iterate through). Do you agree they are quite different results? If you think appropriate I can open an issue for a new feature request, as for what I understand, now we are not supposed to use expressions (or even simple inequalities) outside the where clause. Am I right here? |
I understand the difference now. The
Please do open a new feature request for this. Comparisons and other operators are currently invalid outside the |
Did this ever get raised as a feature request? Case #3552 seems close, but not quite the same thing. |
Using any of
=
,!=
,<
,>
,<=
,>=
will yield empty results for all types.The text was updated successfully, but these errors were encountered: