Skip to content

add support for databricks JSON accessors - #2272

Merged
iffyio merged 4 commits into
apache:mainfrom
whirlun:support-databricks-json-accessor
Mar 13, 2026
Merged

add support for databricks JSON accessors#2272
iffyio merged 4 commits into
apache:mainfrom
whirlun:support-databricks-json-accessor

Conversation

@whirlun

Copy link
Copy Markdown
Contributor

Support databricks SQL JSON accessors
sample queries:

SELECT c1:price
FROM VALUES('{ "price": 5 }') AS T(c1);
SELECT c1:['price']::decimal(5,2)
FROM VALUES('{ "price": 5 }') AS T(c1);
SELECT c1:item[1].price::double
FROM VALUES('{ "item": [ { "model" : "basic", "price" : 6.12 },
{ "model" : "medium", "price" : 9.24 } ] }') AS T(c1);

spec: https://docs.databricks.com/en/sql/language-manual/functions/colonsign.html

the tests are written by Claude Code because it can write tests magnitudes better than me.

@whirlunwhirlun changed the title add databricks JSON accessorsadd support for databricks JSON accessorsMar 8, 2026
Comment threadsrc/parser/mod.rs Outdated
Comment threadsrc/parser/mod.rs Outdated
Comment threadtests/sqlparser_databricks.rs Outdated
Comment threadtests/sqlparser_databricks.rs Outdated

@iffyioiffyio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @whirlun!

@iffyio
iffyio added this pull request to the merge queueMar 13, 2026
Merged via the queue into apache:main with commit 47b6aacMar 13, 2026
10 checks passed
@whirlun
whirlun deleted the support-databricks-json-accessor branch April 13, 2026 20:53
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@whirlun@iffyio