Skip to content

[jdbc-v2] review default value for wait_end_of_query #2830

Done

Description

@chernser

Description

There is setting wait_end_of_query https://clickhouse.com/docs/operations/settings/settings#http_wait_end_of_query that enabled query buffering on server side.
Mainly how it affects query of big data and statistics returned in response.

What need to be done:

  • Explore effect on client side.
  • Document usage
  • Update code if needed.

Activity

  1. added this to the 0.9.10 milestone on Apr 16, 2026
  2. added
    jdbc
    on Apr 16, 2026
  3. self-assigned this
    on Jul 9, 2026
  4. modified the milestones: 0.11.0, 0.12.0 on Oct 1, 2026
  5. removed this from the 0.12.0 milestone on Nov 10, 2026
  6. polyglotAI-bot commented on Nov 19, 2026

    @polyglotAI-bot
    Collaborator

    Exploration result (ClickHouse 26.10.4, jdbc-v2 from main): keep the current default. The driver does not set wait_end_of_query, so the server streams result sets. No code change is necessary. #3397 documents the parameter. It has the measurements.

    Summary:

    • executeUpdate / executeBatch counts are the same with 0 and 1. The server sends the summary of a statement without a result set after the statement ends.
    • =1 gives complete SELECT statistics and a clean SQLException (server code) from executeQuery for an error during the query. Costs: the first row is available only after the query ends, and the server writes each response to a temporary file on its disk (with the default http_response_buffer_size=0).
    • wait_end_of_query is an HTTP parameter, not a setting. readonly=1 profiles accept it, and the SETTINGS clause cannot enable it.

    One finding for #2702 / #3097: with the default 0, when an error occurs after the server sent the first rows, the last 3–20 rows that ResultSet.next() returns before the exception have wrong values (part of the exception block read as data). This occurred in 6 of 6 runs. The PR documents it.

  7. added this to the 0.12.0 milestone on Nov 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

jdbc

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions