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 #791

Closed
LantaoJin opened this issue Oct 19, 2024 · 0 comments
Closed

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

LantaoJin opened this issue Oct 19, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request Lang:PPL Pipe Processing Language support

Comments

@LantaoJin
Copy link
Member

LantaoJin commented Oct 19, 2024

OpenSearch SQL issue: opensearch-project/sql#2805

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.

@LantaoJin LantaoJin added enhancement New feature or request untriaged Lang:PPL Pipe Processing Language support and removed untriaged labels Oct 19, 2024
@LantaoJin LantaoJin self-assigned this Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Lang:PPL Pipe Processing Language support
Projects
None yet
Development

No branches or pull requests

1 participant