[BugFix] Fixed bad path regex to work with legal simple json paths#67988
[BugFix] Fixed bad path regex to work with legal simple json paths#67988stdpain merged 2 commits intoStarRocks:mainfrom
Conversation
|
@cursor review |
|
|
Actually - I think I need to include more things. I noticed I query the json path I don't know nearly enough about what is supported for JSON path though, so I'm a bit apprehensive to keep just adding characters and hope something doesn't break. Can someone with more knowledge take a look and make a recommendation? |
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 1 / 1 (100.00%) file detail
|
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
|
@Mergifyio backport branch-4.1 |
|
@Mergifyio backport branch-4.0 |
|
@Mergifyio backport branch-3.5 |
✅ Backports have been createdDetails
|
✅ Backports have been createdDetails
|
✅ Backports have been createdDetails
Cherry-pick of 62ce106 has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |



Why I'm doing:
I have JSON keys that contain the characters
-. While looking at profiles, I noticed that queries for those keys aren't properly pushing down their filter predicates. This regex prevents the FE from considering this a valid column access expression, which then causes the significantly less performant jsonMerge to run, causing a pretty significant performance regression to all queries accessing these keys.What I'm doing:
Added the
-character I use on a regular basis to the regex.I noticed in the
becode paths, this is the regex that is used, plus one that was commented out? It is unclear to me if there is a better option, but this is what I saw: link to codeWhat type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check:
Note
Updates
JsonPathRewriteRuleto broaden simple JSON path validation from^[a-zA-Z0-9_]+$to^[a-zA-Z0-9\-_]+$.Written by Cursor Bugbot for commit d1e6084. This will update automatically on new commits. Configure here.