镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

[jdbc-v2] Option to trim trailing NULs from FixedString on read #3288

Open

Description

@ShimonSte

getString() / getObject() on a FixedString(N) column return all N bytes, trailing \0 included (BinaryStreamReader decodes new String(bytes, 0, precision)).

That matches ClickHouse semantics. But Tableau 2026.3.0 no longer hides the NULs (2026.2.1 did), so Tableau users see "Dario Medina\0\0\0…". The Tableau connector can't trim on its side, and output_format_trim_fixed_string only applies to text formats, not RowBinary.

Repro (clickhouse-jdbc 0.11.0, ClickHouse 26.10.3.7):

ResultSet rs = conn.createStatement().executeQuery("SELECT toFixedString('Dario', 10)");
rs.next();
rs.getString(1);  // "Dario\0\0\0\0\0", length 10

Ask: an opt-in connection property (e.g. jdbc_trim_fixed_string=true) that strips trailing \0 from FixedString on read. Off by default; the Tableau connector would enable it.

Related: #2929

Activity

  1. added this to the 0.12.0 milestone on Nov 3, 2026
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

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions