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] Support line comment and block comment in PPL #2805

Open
LantaoJin opened this issue Jul 5, 2024 · 0 comments · May be fixed by #2806
Open

[FEATURE] Support line comment and block comment in PPL #2805

LantaoJin opened this issue Jul 5, 2024 · 0 comments · May be fixed by #2806
Labels
enhancement New feature or request

Comments

@LantaoJin
Copy link
Member

Is your feature request related to a problem?
Comment indicates user-provided text. Adding comments to PPL search query is very useful to explain a portion of a search. Block comments and line comments are both supported in SQL query. But neither of them are supported in PPL query.

What solution would you like?
The proposed solution is adding both block comment /* ... */ and line comment // support for PPL.
For example:

source=otel_logs /* Timestamped text record generated by OpenTelemetry framework */
| where kind = 'SPAN_KIND_CLIENT' // only calculate on client
| eval r = 0.99  /* precision */ | stats sum(droppedEventsCount * r) as lostEvents

Besides explanation, line comment can be used to troubleshoot a search.
For example, assuming the above query return 0, you can comment before | eval to identify the kind you pointing is correct.

source=otel_logs | where kind = 'SPAN_KIND_CLIENT' // | eval r = 0.99  | stats sum(droppedEventsCount * r) as lostEvents

What alternatives have you considered?
Non alternatives.

Do you have any additional context?
Add any other context or screenshots about the feature request here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant