Skip to content

docs(iceberg): update JSON schema translation behavior#1603

Open
nvartolomei wants to merge 1 commit intomainfrom
nv/DOC-1957-redpanda-v26.1-improvements
Open

docs(iceberg): update JSON schema translation behavior#1603
nvartolomei wants to merge 1 commit intomainfrom
nv/DOC-1957-redpanda-v26.1-improvements

Conversation

@nvartolomei
Copy link
Contributor

Description

Resolves https://redpandadata.atlassian.net/browse/DOC-1957
Review deadline: v26.1 release

Page previews

Checks

  • New feature
  • Content gap
  • Support Follow-up
  • Small fix (typos, links, copyedits, etc)

@nvartolomei nvartolomei requested a review from a team as a code owner March 11, 2026 15:42
@nvartolomei nvartolomei requested a review from kbatuigas March 11, 2026 15:42
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 11, 2026

📝 Walkthrough

Walkthrough

The change updates JSON Schema validation guidance documentation for Iceberg schema specification. It clarifies and expands supported JSON Schema features: $ref may now be used in subschemas if they resolve to strict types; null type handling is more precisely restricted to nullability markers in type arrays or exclusive oneOf patterns; object type translation now supports both struct and map (via schema-valued additionalProperties). A new "Keyword behavior" section documents supported internal references and nullable patterns. The not-supported features list is reorganized with clearer naming and constraints, including explicit entries for $dynamicRef and adjusted Boolean combination restrictions.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • simon0191
  • micheleRP
  • mattschumpert
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: updating documentation about JSON schema translation behavior for Iceberg.
Description check ✅ Passed The description includes the required JIRA link (DOC-1957), review deadline (v26.1 release), and a completed checklist item (New feature), but lacks the optional page preview link.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch nv/DOC-1957-redpanda-v26.1-improvements

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@netlify
Copy link

netlify bot commented Mar 11, 2026

Deploy Preview for redpanda-docs-preview ready!

Name Link
🔨 Latest commit d68c52e
🔍 Latest deploy log https://app.netlify.com/projects/redpanda-docs-preview/deploys/69b18d5ddc80db0008c1639e
😎 Deploy Preview https://deploy-preview-1603--redpanda-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (3)
modules/manage/pages/iceberg/specify-iceberg-schema.adoc (3)

313-313: Consider adding inline clarification for "exclusive oneOf nullable pattern".

The term "exclusive oneOf nullable pattern" is used here but only defined later in the "Keyword behavior" section (Line 347). Readers encountering this in the table may be confused.

Consider adding a brief inline example or parenthetical clarification, such as:

The `null` type is only supported as a nullability marker, either in a `type` array (for example, `["string", "null"]`) or in an exclusive `oneOf` nullable pattern (where exactly one branch is `{"type":"null"}` and the other is a non-null schema).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/manage/pages/iceberg/specify-iceberg-schema.adoc` at line 313, Add a
short parenthetical clarification to the sentence about the `null` type so
readers immediately understand "exclusive `oneOf` nullable pattern" without
jumping to the later section; for example, append a brief phrase after "oneOf
nullable pattern" such as "(i.e., an exclusive oneOf where exactly one branch is
{"type":"null"} and the other branch is a non-null schema)" referencing the
`null` type and `oneOf` examples so the meaning is clear in-place.

329-329: Minor grammar improvement: remove redundant "object".

The phrase "A schema-valued additionalProperties object" is slightly awkward. The word "object" at the end is redundant since additionalProperties itself is the keyword.

✍️ Suggested rewording

Consider one of these alternatives:

Option 1:

-Use `properties` to define `struct` fields and constrain their types. `additionalProperties: false` is supported for closed objects. A schema-valued `additionalProperties` object is translated to an Iceberg `map<string, T>`. You cannot combine `properties` and schema-valued `additionalProperties` in the same object.
+Use `properties` to define `struct` fields and constrain their types. `additionalProperties: false` is supported for closed objects. A schema-valued `additionalProperties` is translated to an Iceberg `map<string, T>`. You cannot combine `properties` and schema-valued `additionalProperties` in the same object.

Option 2:

-Use `properties` to define `struct` fields and constrain their types. `additionalProperties: false` is supported for closed objects. A schema-valued `additionalProperties` object is translated to an Iceberg `map<string, T>`. You cannot combine `properties` and schema-valued `additionalProperties` in the same object.
+Use `properties` to define `struct` fields and constrain their types. `additionalProperties: false` is supported for closed objects. When `additionalProperties` is a schema object, it is translated to an Iceberg `map<string, T>`. You cannot combine `properties` and schema-valued `additionalProperties` in the same object.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/manage/pages/iceberg/specify-iceberg-schema.adoc` at line 329, The
sentence "A schema-valued `additionalProperties` object is translated to an
Iceberg `map<string, T>`." uses a redundant trailing "object"; update the
wording to remove it so it reads e.g. "A schema-valued `additionalProperties` is
translated to an Iceberg `map<string, T>`." Make this change wherever this exact
sentence appears (referencing the `additionalProperties` keyword and the Iceberg
`map<string, T>` translation) to improve grammar and clarity.

354-355: Improve technical terminology for JSON Schema features.

Two phrases use non-standard or ambiguous terminology:

  1. Line 354: "Conditional typing (if, then, else, dependencies keywords)" - The term "conditional typing" is not standard JSON Schema terminology. The standard term is "conditional subschemas" or "schema dependencies".

  2. Line 355: "Boolean JSON Schema combinations" - This is non-standard terminology. The standard terms are "schema combinators" or "schema composition keywords".

📚 Suggested improvements
-* Conditional typing (`if`, `then`, `else`, `dependencies` keywords)
-* Boolean JSON Schema combinations (`allOf`, `anyOf`, and non-nullable `oneOf` patterns)
+* Conditional subschemas (`if`, `then`, `else`, `dependencies` keywords)
+* Schema combinators (`allOf`, `anyOf`, and non-nullable `oneOf` patterns)

Or alternatively:

-* Conditional typing (`if`, `then`, `else`, `dependencies` keywords)
-* Boolean JSON Schema combinations (`allOf`, `anyOf`, and non-nullable `oneOf` patterns)
+* Conditional schema application (`if`, `then`, `else`, `dependencies` keywords)
+* Boolean schema composition (`allOf`, `anyOf`, and non-nullable `oneOf` patterns)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/manage/pages/iceberg/specify-iceberg-schema.adoc` around lines 354 -
355, Replace the non-standard phrases in the bulleted list: change "Conditional
typing (`if`, `then`, `else`, `dependencies` keywords)" to use standard JSON
Schema terminology such as "Conditional subschemas (`if`, `then`, `else`) and
schema dependencies (`dependencies`)" and change "Boolean JSON Schema
combinations (`allOf`, `anyOf`, and non-nullable `oneOf` patterns)" to "Schema
combinators / composition keywords (`allOf`, `anyOf`, `oneOf`)" so the document
uses "conditional subschemas" and "schema combinators" consistently (update the
two phrase occurrences shown in the diff).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@modules/manage/pages/iceberg/specify-iceberg-schema.adoc`:
- Line 346: The phrase "references to unknown keywords" in the sentence about
$ref is ambiguous; update the wording around the $ref/$id sentence to enumerate
the exact unsupported cases (e.g., references to external resources, references
to non-existent schema $id values, undefined anchors or unresolvable
fragments/JSON Pointer fragments) and keep the note that a root-level $ref
schema is not supported; reference the $ref and $id tokens as the symbols to
edit so the text explicitly says "References to external resources, non-existent
$id values, or undefined anchors/fragments are not supported" (or similar
concise wording).

---

Nitpick comments:
In `@modules/manage/pages/iceberg/specify-iceberg-schema.adoc`:
- Line 313: Add a short parenthetical clarification to the sentence about the
`null` type so readers immediately understand "exclusive `oneOf` nullable
pattern" without jumping to the later section; for example, append a brief
phrase after "oneOf nullable pattern" such as "(i.e., an exclusive oneOf where
exactly one branch is {"type":"null"} and the other branch is a non-null
schema)" referencing the `null` type and `oneOf` examples so the meaning is
clear in-place.
- Line 329: The sentence "A schema-valued `additionalProperties` object is
translated to an Iceberg `map<string, T>`." uses a redundant trailing "object";
update the wording to remove it so it reads e.g. "A schema-valued
`additionalProperties` is translated to an Iceberg `map<string, T>`." Make this
change wherever this exact sentence appears (referencing the
`additionalProperties` keyword and the Iceberg `map<string, T>` translation) to
improve grammar and clarity.
- Around line 354-355: Replace the non-standard phrases in the bulleted list:
change "Conditional typing (`if`, `then`, `else`, `dependencies` keywords)" to
use standard JSON Schema terminology such as "Conditional subschemas (`if`,
`then`, `else`) and schema dependencies (`dependencies`)" and change "Boolean
JSON Schema combinations (`allOf`, `anyOf`, and non-nullable `oneOf` patterns)"
to "Schema combinators / composition keywords (`allOf`, `anyOf`, `oneOf`)" so
the document uses "conditional subschemas" and "schema combinators" consistently
(update the two phrase occurrences shown in the diff).

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 73bd4385-5e4f-4e87-b541-1003e1b95486

📥 Commits

Reviewing files that changed from the base of the PR and between f8d4bd6 and d68c52e.

📒 Files selected for processing (1)
  • modules/manage/pages/iceberg/specify-iceberg-schema.adoc


Keyword behavior:

* The `$ref` keyword is supported for internal references resolved from schema resources declared in the same document (using `$id`), including relative and absolute URI forms. References to external resources and references to unknown keywords are not supported. A root-level `$ref` schema is not supported.
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

Clarify "references to unknown keywords".

The phrase "references to unknown keywords" is unclear. In JSON Schema, $ref typically references schema resources (via $id, anchors, or URIs), not keywords directly.

This phrase might mean:

  • References to non-existent schema IDs
  • References to undefined anchors or fragments
  • Something else
📝 Suggested clarification

Consider more specific wording, such as:

-The `$ref` keyword is supported for internal references resolved from schema resources declared in the same document (using `$id`), including relative and absolute URI forms. References to external resources and references to unknown keywords are not supported. A root-level `$ref` schema is not supported.
+The `$ref` keyword is supported for internal references resolved from schema resources declared in the same document (using `$id`), including relative and absolute URI forms. References to external resources and references to undefined schema resources are not supported. A root-level `$ref` schema is not supported.

Or if you specifically mean JSON Pointer fragments:

References to external resources and unresolvable fragments are not supported.
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* The `$ref` keyword is supported for internal references resolved from schema resources declared in the same document (using `$id`), including relative and absolute URI forms. References to external resources and references to unknown keywords are not supported. A root-level `$ref` schema is not supported.
* The `$ref` keyword is supported for internal references resolved from schema resources declared in the same document (using `$id`), including relative and absolute URI forms. References to external resources and references to undefined schema resources are not supported. A root-level `$ref` schema is not supported.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@modules/manage/pages/iceberg/specify-iceberg-schema.adoc` at line 346, The
phrase "references to unknown keywords" in the sentence about $ref is ambiguous;
update the wording around the $ref/$id sentence to enumerate the exact
unsupported cases (e.g., references to external resources, references to
non-existent schema $id values, undefined anchors or unresolvable fragments/JSON
Pointer fragments) and keep the note that a root-level $ref schema is not
supported; reference the $ref and $id tokens as the symbols to edit so the text
explicitly says "References to external resources, non-existent $id values, or
undefined anchors/fragments are not supported" (or similar concise wording).


Keyword behavior:

* The `$ref` keyword is supported for internal references resolved from schema resources declared in the same document (using `$id`), including relative and absolute URI forms. References to external resources and references to unknown keywords are not supported. A root-level `$ref` schema is not supported.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
* The `$ref` keyword is supported for internal references resolved from schema resources declared in the same document (using `$id`), including relative and absolute URI forms. References to external resources and references to unknown keywords are not supported. A root-level `$ref` schema is not supported.
* The `$ref` keyword is supported for internal references resolved from schema resources declared in the same document (using `$id`), including relative and absolute URI forms. References to external resources and references to undefined schema resources are not supported. A root-level `$ref` schema is not supported.

Copy link
Contributor

@Feediver1 Feediver1 left a comment

Choose a reason for hiding this comment

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

lgtm

Sign up for free to 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