Skip to content

Support line comment and block comment in PPL#2806

Merged
LantaoJin merged 2 commits intoopensearch-project:mainfrom
LantaoJin:pr/feature_issue_2805
Apr 8, 2025
Merged

Support line comment and block comment in PPL#2806
LantaoJin merged 2 commits intoopensearch-project:mainfrom
LantaoJin:pr/feature_issue_2805

Conversation

@LantaoJin
Copy link
Copy Markdown
Member

@LantaoJin LantaoJin commented Jul 8, 2024

Description

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

Issues Resolved

Resolves #2805

Check List

  • New functionality includes testing.
    • All tests pass, including unit test, integration test and doctest
  • New functionality has been documented.
    • New functionality has javadoc added
    • New functionality has user manual doc added
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

dai-chen
dai-chen previously approved these changes Jul 10, 2024
Copy link
Copy Markdown
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the changes!

@LantaoJin
Copy link
Copy Markdown
Member Author

Gently ping @penghuo @vamsi-amazon @YANG-DB

@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

This PR is stalled because it has been open for 30 days with no activity.

YANG-DB
YANG-DB previously approved these changes Dec 30, 2024
@LantaoJin LantaoJin dismissed stale reviews from YANG-DB and dai-chen via d4ed787 January 9, 2025 03:27
@LantaoJin LantaoJin requested a review from noCharger as a code owner January 9, 2025 03:27
@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

This PR is stalled because it has been open for 30 days with no activity.

@YANG-DB
Copy link
Copy Markdown
Member

YANG-DB commented Feb 10, 2025

hi @LantaoJin
if this PR is still relevant plz merge and resolve conflicts, if not can we close the PR ?
thanks

Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: Lantao Jin <ltjin@amazon.com>
@LantaoJin LantaoJin force-pushed the pr/feature_issue_2805 branch from bab9b16 to 16cf155 Compare April 7, 2025 03:34
@LantaoJin LantaoJin requested a review from qianheng-aws as a code owner April 7, 2025 03:34
@LantaoJin LantaoJin requested review from YANG-DB and dai-chen April 7, 2025 05:29
@LantaoJin
Copy link
Copy Markdown
Member Author

Updated, gently ping @dai-chen @penghuo

Copy link
Copy Markdown
Collaborator

@dai-chen dai-chen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I saw our SQL support line comment by # or --. This PPL line comment syntax is trying to consistent with SPL?

@LantaoJin
Copy link
Copy Markdown
Member Author

This PPL line comment syntax is trying to consistent with SPL?

Yes.

@LantaoJin LantaoJin merged commit e0b7268 into opensearch-project:main Apr 8, 2025
22 checks passed
@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/sql/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/sql/backport-2.x
# Create a new branch
git switch --create backport/backport-2806-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 e0b72683a1ad4758276be802bfaf2c8de0e01d7d
# Push it to GitHub
git push --set-upstream origin backport/backport-2806-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/sql/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-2806-to-2.x.

penghuo pushed a commit that referenced this pull request Jun 16, 2025
* Support line comment and block comment in PPL

Signed-off-by: Lantao Jin <ltjin@amazon.com>

* add user doc

Signed-off-by: Lantao Jin <ltjin@amazon.com>

---------

Signed-off-by: Lantao Jin <ltjin@amazon.com>
Signed-off-by: xinyual <xinyual@amazon.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Support line comment and block comment in PPL

4 participants