Skip to content

Conversation

@Swiddis
Copy link
Collaborator

@Swiddis Swiddis commented Nov 14, 2025

Description

Implemented the unquoting as part of #4185 but we decided against the full change. But the unquoting itself is still necessary for e.g. @timestamp, and rewriting nontrivial paths to json_extract. This PR implements string-quoted spath paths.

Related Issues

Unable to parse literal dots in fields like {"a.b.c": "value"}

Check List

  • New functionality includes testing.
  • New functionality has been documented.
  • New functionality has javadoc added.
  • New functionality has a user manual doc added.
  • New PPL command checklist all confirmed.
  • API changes companion pull request created.
  • Commits are signed per the DCO using --signoff or -s.
  • Public documentation issue/PR created.

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.

Signed-off-by: Simeon Widdis <[email protected]>
This reverts commit 5ae2b06.

Signed-off-by: Simeon Widdis <[email protected]>
@Swiddis Swiddis added PPL Piped processing language backport 2.19-dev labels Nov 14, 2025
RyanL1997
RyanL1997 previously approved these changes Nov 18, 2025
Copy link
Collaborator

@penghuo penghuo left a comment

Choose a reason for hiding this comment

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

Update doc and doctest to explain this feature.

@Test
public void testSpathEscapedParse() {
SPath sp =
(SPath) plan("source = t | spath input=f output=o path=`attributes.['cluster.name']`");
Copy link
Collaborator

@penghuo penghuo Nov 18, 2025

Choose a reason for hiding this comment

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

double quoted also supported? "attributes.['cluster.name']"
I think SPL spath only support double quote.

Copy link
Collaborator Author

@Swiddis Swiddis Nov 18, 2025

Choose a reason for hiding this comment

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

Added support for string escapes + relevant testing/docs

@Swiddis Swiddis merged commit 5a68caa into opensearch-project:main Nov 18, 2025
71 of 74 checks passed
@Swiddis Swiddis deleted the feature/ppl-dotted-fields branch November 18, 2025 23:33
opensearch-trigger-bot bot pushed a commit that referenced this pull request Nov 18, 2025
(cherry picked from commit 5a68caa)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport 2.19-dev bugFix PPL Piped processing language

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants