Repository navigation
Write full type names in block headers - #34
Merged
Merged
Conversation
chc_block_write_cols staged each column's type name in a 256 byte stack buffer & failed with "type name too long for inline buffer" past 255 bytes, so a block carrying a wide Enum or a deeply nested type could not be sent. Write the parsed type's stored spelling directly.
Member
|
very nice |
serprex
approved these changes
Nov 22, 2026
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.
chc_block_write_cols copies each column's type name into a 256-byte stack buffer and returns CHC_ERR_USAGE ("type name too long for inline buffer") when the name doesn't fit. A valid type longer than 255 bytes can't be sent. For example, an INSERT block for
Enum16('label_00' = 1, ..., 'label_39' = 40)fails before any byte is written. Wide Enums, named Tuples and deep nesting reach that length easily.The column's parsed type already stores its full spelling, so the writer now sends that through chc_type_name().
test_write_long_enum round-trips that Enum16 through
clickhouse local. test_block_write_rejects asserted the old rejection, so it is removed.