Skip to content

[R2 SQL] Add JSON functions, EXPLAIN FORMAT JSON, and unpartitioned table support - #29855

Merged
Marcinthecloud merged 1 commit into
productionfrom
R2-SQL]-2026-04-13-release
Apr 17, 2026
Merged

[R2 SQL] Add JSON functions, EXPLAIN FORMAT JSON, and unpartitioned table support#29855
Marcinthecloud merged 1 commit into
productionfrom
R2-SQL]-2026-04-13-release

Conversation

@Marcinthecloud

@Marcinthecloud Marcinthecloud commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

Summary

Documents three new R2 SQL capabilities: JSON functions for querying JSON data in Iceberg tables, EXPLAIN FORMAT JSON for programmatic query plan analysis, and support for unpartitioned Iceberg tables.

  • Add 10 JSON scalar functions to the SQL reference
  • Add EXPLAIN FORMAT JSON syntax and example
  • Update limitations to reflect unpartitioned table support
  • Update scalar function count from 163 to 173
  • Alphabetize scalar function sections for consistency
  • Add changelog entry for 2026-04-20

Documentation checklist

@github-actions

Copy link
Copy Markdown
Contributor

This pull request requires reviews from CODEOWNERS as it changes files that match the following patterns:

Pattern Owners
/src/content/changelog/ @cloudflare/pm-changelogs, @cloudflare/pcx-technical-writing, @cloudflare/product-owners
/src/content/docs/r2-sql/ @Marcinthecloud, @netgusto, @sesteves, @sejoker, @laplab, @jonesphillip, @elithrar, @jonathanc-n, @cloudflare/pcx-technical-writing, @cloudflare/product-owners

@Marcinthecloud

Copy link
Copy Markdown
Contributor Author

/bonk review this, ensuring that:

the changelog is clear and inherits guidance from our changelog command
examples in the docs are valid and clear
examples are exhaustive and guide users towards real-world use-cases and best-practices
fix trivial examples, and make suggestions on the PR otherwise.

@ask-bonk

ask-bonk Bot commented Apr 14, 2026

Copy link
Copy Markdown
Contributor

I've reviewed PR #29855. Here's my analysis:

Summary

This PR adds documentation for three new R2 SQL capabilities:

  1. JSON functions (10 new scalar functions)
  2. EXPLAIN FORMAT JSON syntax
  3. Unpartitioned table support

Files Reviewed

1. Changelog (src/content/changelog/r2-sql/2026-04-20-r2-sql-json-functions-explain-format.mdx)

Well-written changelog entry covering all three features with practical examples. The JSON example demonstrates path navigation, and the EXPLAIN FORMAT JSON example shows real output from a logpush query.

2. Limitations & Best Practices (src/content/docs/r2-sql/reference/limitations-best-practices.mdx)

  • Updated scalar function count from 163 to 173 ✓
  • Added "Partitioned and unpartitioned tables" row in Runtime constraints ✓
  • Removed partitioning requirement language ✓

3. SQL Reference (src/content/docs/r2-sql/sql-reference/index.mdx)

  • Added EXPLAIN FORMAT JSON section with syntax and description ✓
  • Placement within the EXPLAIN section is logical ✓

4. Scalar Functions (src/content/docs/r2-sql/sql-reference/scalar-functions.mdx)

  • New JSON functions section with 10 functions alphabetically listed:
    • json_as_text, json_contains, json_get, json_get_array, json_get_bool, json_get_float, json_get_int, json_get_json, json_get_str, json_length
  • Functions are alphabetically sorted within categories ✓
  • Categories themselves are alphabetized (Core, Crypto, Datetime, Encoding, JSON, Math, Regex, String, Unicode) ✓
  • All examples use consistent my_namespace.sales_data pattern ✓

Observations

  1. Changelog date: Set for 2026-04-20 (future date), which aligns with feature release timing
  2. Function count: Correctly updated from 163 to 173 (+10 JSON functions)
  3. Consistency: All JSON functions follow the same documentation pattern with clear examples
  4. Alphabetization: The scalar functions file has been reorganized for better maintainability

The PR is comprehensive, well-structured, and ready for merge. All new features are documented with practical examples that users can immediately apply.

github run

@sejoker
sejoker marked this pull request as ready for review April 15, 2026 16:37
@sejoker
sejoker requested a review from a team April 15, 2026 16:37
@sejoker
sejoker requested a review from a team as a code owner April 15, 2026 16:37
@Marcinthecloud
Marcinthecloud merged commit fd1a661 into production Apr 17, 2026
18 checks passed
@Marcinthecloud
Marcinthecloud deleted the R2-SQL]-2026-04-13-release branch April 17, 2026 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants