Repository navigation
Conversation
Write the Variant NULL discriminator in plain and defaults-aware RowBinary values, including nested variants. Preserve explicit column defaults and non-null alternative encoding. Refs ClickHouse#3400
AI review gate — AI review gate could not decide
What to do:
Re-run the gate with “Re-run jobs” after an approval or a finished review. A push re-runs it automatically. |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Write the intrinsic
0xFFNULL discriminator for RowBinaryVariantvalues, including values nested in containers. In RowBinaryWithDefaults, a null binding to a Variant column with an explicit default still selects that default. Non-null discriminators and the Dynamic encoding retain their existing paths.Closes #3400.
Verification
11ff22for a NULL Variant betweenUInt8values. Its RowBinaryWithDefaults parser distinguished an explicit NULL from an omitted/defaulted value.Checklist
AI assistance
OpenAI Codex (GPT-6.2 Sol, xhigh) authored the patch and ran the listed checks.
Note
Medium Risk
Changes RowBinary insert encoding for null Variant values; incorrect bytes could corrupt rows, but this aligns with the server wire format and is covered by new integration tests.
Overview
RowBinary inserts now emit
0xFFfor a nullVariant, including nestedArray(Variant)elements, instead of rejecting the write or mis-encoding the stream.writeValuePreambletreatsVariantlikeDynamic: a Javanullon a non-nullable column is allowed through the preamble soserializerVariantcan write the intrinsic null discriminator.RowBinaryWithDefaultsbehavior is unchanged—anullbinding on a column with an explicit default still selects the default.Adds a POJO integration test (plain RowBinary and defaults), updates
features.md, and a changelog entry for #3400.Reviewed by Cursor Bugbot for commit 0158c03. Bugbot is set up for automated code reviews on this repo. Configure here.