-
- Downloads
[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:Herman van Hovell <hvanhovell@databricks.com>
Showing
- sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/jsonExpressions.scala 1 addition, 1 deletion...ache/spark/sql/catalyst/expressions/jsonExpressions.scala
- sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/JsonExpressionsSuite.scala 24 additions, 0 deletions...spark/sql/catalyst/expressions/JsonExpressionsSuite.scala
Loading
Please register or sign in to comment