You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Define VariantPath's grammar and compatibility target #11627
Is your feature request related to a problem or challenge?
We've referred to both Spark/Databricks paths and JSONPath while building
VariantPath, but haven't settled which behavior we're targeting when they differ.
Escaping is one example: Arrow reads ['a\nb'] as the key anb. Spark 4.2 and 4.3 keep the backslash and read a\nb. Spark master, targeting 4.4, reads \n as a newline (apache/spark#59097, merged as SPARK-59218), and spark.sql.legacy.variantPathBackslashAsLiteral restores the older behavior. Arrow also accepts \], which RFC 9535 rejects.
Describe the solution you'd like
Agree on the target and document the supported subset:
Should VariantPath follow Spark/Databricks, RFC 9535, or its existing behavior?
How should we handle accepted paths whose meaning would change?
Which extensions belong to specific consumers, such as [*] for shredding
schemas versus singular paths for variant_get?
Capture the decision in a small compatibility table and tests, starting with
quotes and backslash escapes.
Describe alternatives you've considered
Keep the current grammar and document its differences. That's also a valid
choice; the goal is to make future parsing decisions consistent.
I'd document the current grammar as the default and make Spark/RFC escape decoding an explicit mode if we decide to add it, since changing ['a\nb'] would silently select a different key. A compatibility test should put both anb and a\nb (with an actual newline) in the same object so it catches a meaning change, rather than only checking that parsing succeeds. For [*], I'd keep the existing consumer split: VariantPath represents it, variant_get rejects it, and shredding treats it as an element-schema selector.
Activity
cakeni commentedon Oct 17, 2026
I'd document the current grammar as the default and make Spark/RFC escape decoding an explicit mode if we decide to add it, since changing
['a\nb']would silently select a different key. A compatibility test should put bothanbanda\nb(with an actual newline) in the same object so it catches a meaning change, rather than only checking that parsing succeeds. For[*], I'd keep the existing consumer split:VariantPathrepresents it,variant_getrejects it, and shredding treats it as an element-schema selector.sdf-jkl commentedon Oct 30, 2026
I want to avoid
And adopt an existing format, so keeping the existing behavior as is does not seem like a good idea to me 🤷
sdf-jkl commentedon Nov 10, 2026
Originally posted by @alamb in #166
makes me inclined to follow spark
alamb commentedon Nov 12, 2026
👍
[Variant] Parse `VariantPath` strings with Spark's path syntax (apach…
alamb commentedon Nov 19, 2026
We got carried away and had to revert this for 60 -- will target 61. See #12247