Skip to content
Snippets Groups Projects
Commit c69825a9 authored by Ryan Blue's avatar Ryan Blue Committed by Herman van Hovell
Browse files

[SPARK-18677] Fix parsing ['key'] in JSON path expressions.


## What changes were proposed in this pull request?

This fixes the parser rule to match named expressions, which doesn't work for two reasons:
1. The name match is not coerced to a regular expression (missing .r)
2. The surrounding literals are incorrect and attempt to escape a single quote, which is unnecessary

## How was this patch tested?

This adds test cases for named expressions using the bracket syntax, including one with quoted spaces.

Author: Ryan Blue <blue@apache.org>

Closes #16107 from rdblue/SPARK-18677-fix-json-path.

(cherry picked from commit 48778976)
Signed-off-by: default avatarHerman van Hovell <hvanhovell@databricks.com>
parent 32c85383
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment