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: InfluxQL comments #8025

Closed
rw opened this issue Feb 17, 2017 · 5 comments
Closed

Feature request: InfluxQL comments #8025

rw opened this issue Feb 17, 2017 · 5 comments
Assignees
Labels
area/influxql Issues related to InfluxQL query language kind/feature-request

Comments

@rw
Copy link
Contributor

rw commented Feb 17, 2017

Proposal: Comments in InfluxQL.

Current behavior: Comments are not supported.

Desired behavior: Allow line-oriented comments in InfluxQL. Example:

# This query computes a bar from foo.
select bar from foo

Use case: When performing data analysis, I end up using scripting pipelines that look like this:

cat my_query.infuxql | influx > output.txt

Inside my_query.influxql I have no way to document the queries (and now, subqueries). Comments would increase maintainability.

@mark-rushakoff mark-rushakoff added area/influxql Issues related to InfluxQL query language kind/feature-request labels Feb 18, 2017
@mark-rushakoff
Copy link
Contributor

I've found myself reaching for the -- line comment on a few occasions. It looks like many other SQL variants support /* */ block comments, but I don't know whether supporting block comments would require us to add support for multi-line commands.

@jsternberg jsternberg self-assigned this Feb 27, 2017
@jsternberg
Copy link
Contributor

We technically already have multiline commands. Whitespace is mostly ignored so you can split a command between multiple lines pretty easily (although the CLI does not support it, but that's different than the server not supporting it).

I think this should be fairly easy to do and is a nice little feature. Thoughts @pauldix?

@jsternberg
Copy link
Contributor

Also, what's the settled syntax for this? -- for single line comments and /* */ for multiline comments? Should we support nested multiline comments such as /* /* */ */? I vote no on the latter, but I thought I would bring it up anyway as some programming languages like D support that.

@mark-rushakoff
Copy link
Contributor

mark-rushakoff commented Feb 27, 2017 via email

@pauldix
Copy link
Member

pauldix commented Mar 15, 2017

LGTM. Although I am wondering if people will also try // for single line and get confused since we support /* */ for multi-line and generally if you support the latter, you support the former.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/influxql Issues related to InfluxQL query language kind/feature-request
Projects
None yet
Development

No branches or pull requests

4 participants