Skip to content

[client-v2] FixedString padding #2929

Open
Open

Description

@chernser

Description

Exact number of bytes should be sent when writing a FixedString. When string has less number then client add padding 0s . This behavior is not documented well.

Activity

  1. added this to the 0.11.0 milestone on Jul 15, 2026
  2. added
    documentation
    client
    data-types
    on Jul 15, 2026
  3. modified the milestones: 0.11.0, 0.12.0 on Sep 23, 2026
  4. removed this from the 0.12.0 milestone on Nov 11, 2026
  5. polyglotAI-bot commented on Nov 27, 2026

    @polyglotAI-bot
    Collaborator

    Recommendation: Keep open — docs change needed
    The client-v2 docs do not say that a FixedString(N) write pads a shorter value with zero bytes, and fails for a value longer than N bytes. The next step is a docs change in docs/clickhouse-docs/client.mdx.

    Analysis: SerializerUtils.java:1134 (byte[]) and BinaryStreamUtils.java:1615 (String, as UTF-8) write the value and then zero bytes up to N, and reject a value longer than N bytes; N counts bytes, not characters. The type table (client.mdx:572) and its note on binary strings (client.mdx:600) give no write rule for FixedString; only the JDBC page documents the zero padding, and only on read (jdbc.mdx:361).

    Automated triage by Polyglot AI. A maintainer makes the final decision.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    clientdata-typesdocumentation

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions