Skip to content

beta.row_binary_for_simple_insert fails on Uint64 values larger than long type passed as string #2619

In review

Description

@troyjcurt

Describe your feedback

when you pass a very large number (larger than max long, but smaller than max UInt64) as a string in a simple insert, the client attempts to convert this value into a long using Long.parseLong, which will fail, as the string value is higher than the long boundary. something like BigInteger.longValue would be required for this translation.

Code example

preparedStatement.setString(1, bignumber);
preparedStatement.addBatch();

Activity

  1. added
    investigating
    jdbc-v2
    and removed on Oct 27, 2025
  2. added this to the 0.9.4 milestone on Oct 27, 2025
  3. chernser commented on Oct 27, 2025

    @chernser
    Contributor

    Good day, @troyjcurt !
    What version of a JDBC driver do you use?
    Would you please give a JDBC url and connection properties?

    Thanks!

  4. troyjcurt commented on Oct 27, 2025

    @troyjcurt
    Author

    The JDBC version was 0.9.2 (v2), and the connection url was: jdbc:ch://${CLICKHOUSE_HOSTNAME:localhost}:${CLICKHOUSE_PORT:8123}/${DB_NAME:database}?beta.row_binary_for_simple_insert=true

  5. chernser commented on Oct 27, 2025

    @chernser
    Contributor

    Thank you, @troyjcurt!

    this beta.row_binary_for_simple_insert=true is critical configuration parameter.
    We will fix it.

  6. added
    area:jdbc-insert
    and removed
    investigating
    on Oct 27, 2025
  7. removed this from the 0.9.5 milestone on Nov 17, 2025
  8. added this to the 0.12.0 milestone on Jul 22, 2026
  9. added
    planned_work
    on Nov 18, 2026
  10. chernser commented on Nov 24, 2026

    @chernser
    Contributor

    This is related to the data validation on client
    Normally we should not allow using string for number parameter. But because we have different internal logic it happens.
    @polyglotAI-bot please fix it:

    • use proper parse function according to column type
    • add few words in documentation that application should pass values of the type matching parameter ones.
    • verify all integers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

area:jdbc-insertbugjdbc-v2planned_work

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions