Support escaped field names in SPath parsing#4813
Merged
Swiddis merged 5 commits intoopensearch-project:mainfrom Nov 18, 2025
Merged
Support escaped field names in SPath parsing#4813Swiddis merged 5 commits intoopensearch-project:mainfrom
Swiddis merged 5 commits intoopensearch-project:mainfrom
Conversation
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
This reverts commit 5ae2b06. Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
RyanL1997
previously approved these changes
Nov 18, 2025
penghuo
reviewed
Nov 18, 2025
Collaborator
penghuo
left a comment
There was a problem hiding this comment.
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']`"); |
Collaborator
There was a problem hiding this comment.
double quoted also supported? "attributes.['cluster.name']"
I think SPL spath only support double quote.
Collaborator
Author
There was a problem hiding this comment.
Added support for string escapes + relevant testing/docs
Signed-off-by: Simeon Widdis <sawiddis@amazon.com>
penghuo
approved these changes
Nov 18, 2025
RyanL1997
approved these changes
Nov 18, 2025
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>
LantaoJin
pushed a commit
that referenced
this pull request
Nov 19, 2025
asifabashar
pushed a commit
to asifabashar/sql
that referenced
this pull request
Dec 10, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
--signoffor-s.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.