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

InfluxQL regex operator =~ requires a space after it but other operators do not #9058

Closed
russorat opened this issue Nov 3, 2017 · 2 comments

Comments

@russorat
Copy link
Contributor

russorat commented Nov 3, 2017

Bug report

System info:
InfluxDB shell version: v1.3.6
Mac OS X 10.13

Steps to reproduce:

  1. run a query with a regex such as SELECT mean("usage_idle") AS "mean_usage_idle" FROM "telegraf"."autogen"."cpu" WHERE "cpu"=~/cpu0/ and notice that it has a parse error
  2. add a space after the regex operator SELECT mean("usage_idle") AS "mean_usage_idle" FROM "telegraf"."autogen"."cpu" WHERE "cpu"=~ /cpu0/ and notice it succeeds
  3. run a query with an equals operator and notice that there is no space SELECT mean("usage_idle") AS "mean_usage_idle" FROM "telegraf"."autogen"."cpu" WHERE "cpu"='cpu0' which succeds

Expected behavior: InfluxQL should not require a space after the regex operator

Actual behavior: the query fails to parse unless there is a space following the regex operator

Additional info: none

stop-start added a commit to stop-start/influxql that referenced this issue Nov 10, 2017
Fix for this issue: influxdata/influxdb#9058
Removed p.consumeWhitespace() when parsing expression and added a test
@rye
Copy link

rye commented Jul 19, 2018

I think this was fixed by influxdata/influxql#4—should this issue be closed?

@dgnorton dgnorton added the 1.x label Jan 7, 2019
@cktang88
Copy link

cktang88 commented May 8, 2019

Yeah I think this should be closed.

@russorat russorat closed this as completed May 8, 2019
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

5 participants