Skip to content

Validate enum values when requested - #551

Merged
slabko merged 1 commit into
ClickHouse:masterfrom
fallintoplace:fix/validate-enum-values
Aug 24, 2026
Merged

Validate enum values when requested#551
slabko merged 1 commit into
ClickHouse:masterfrom
fallintoplace:fix/validate-enum-values

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What changed

  • Validate numeric enum values when checkValue is true in Append() and SetAt().
  • Throw ValidationError when the value is not defined in the enum type.
  • Keep the default unchecked behavior unchanged.

Tests

  • cmake --build build --target clickhouse-cpp-ut --parallel 8
  • ./build/ut/clickhouse-cpp-ut --gtest_filter='ColumnsCase.Enum*'

@slabko
slabko merged commit 626b790 into ClickHouse:master Aug 24, 2026
45 checks passed
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