Revision history for DBD::ClickHouse

0.11  2026-12-01
    - First release to CPAN (0.02 and 0.10 were never published).
    - Added AI_POLICY.md and an AI disclosure in the POD: written with AI
      assistance, reviewed, tested and released by the maintainer.
    - Docs note that the maintainer uses the module in production.
    - Release packaging: LICENSE and README added, Makefile.PL metadata
      completed, POD updated (EXAMPLES inline, installation notes).
    - auto (the default clickhouse_format) now picks RowBinary, falling
      back to TSV or JSON when a column cannot be decoded.
    - TSV results use a compiled per-statement decoder (split, lazy
      unescape, in-place numify) instead of a second coerce pass.
    - RowBinary results compile a per-statement decoder with a literal
      unpack template (parsed once, not once per row).
    - fetchall_arrayref / clickhouse_fetch_batch(0) reuse the decoded
      row arrays instead of copying them.
    - Larger HTTP and decode buffers (4 MiB).
    - HTTP header and chunk-size lines still use 64 KiB reads so a 4 MiB
      body read cannot trip the 1 MiB line cap.
    - Faster DateTime/Date formatting (civil date, no gmtime).
    - RowBinary mid-stream exception scan only looks at newly read bytes.
    - Format fallback on a streaming statement clears the leftover body so the retry does not parse the previous format as JSON or TSV.
    - clickhouse_streaming now defaults on. Set streaming=0 or
      clickhouse_streaming => 0 to buffer the whole result first (the
      0.10 default). A streaming statement still owns the connection
      until finish or the last fetch; catalog helpers force it off.

0.10  2026-12-01
    Result formats
    - Default result format is now TabSeparatedWithNamesAndTypes ("tsv";
      clickhouse_format => 'auto'). JSONCompactEachRowWithNamesAndTypes
      is kept as clickhouse_format => 'json' and as the automatic fallback.
    - New opt-in RowBinaryWithNamesAndTypes reader (clickhouse_format =>
      'rowbinary'). DateTime/Date values come back as the same strings as
      before; clickhouse_epoch_dates => 1 returns epoch seconds instead.
    - Results with Array/Map/Tuple/Nested/JSON/Variant/Dynamic/geo/
      AggregateFunction columns re-run the query as json automatically;
      rowbinary falls back to tsv for types it cannot decode (Int128/256,
      wide Decimal, IPv6, ...). The chosen format is visible in the
      read-only statement attribute clickhouse_effective_format.
    - An explicit FORMAT clause in the SQL is always respected.
    - New DSN keys format=, epoch_dates=, insert_format=,
      insert_rows_per_request=; matching dbh/sth attributes.
    Fetch API
    - New $sth->clickhouse_fetch_batch($max) returning up to $max rows (one
      network batch when $max is 0) and undef at the end.
    - fetchall_arrayref without a slice or max_rows drains the stream in
      batches instead of row by row.
    Inserts
    - clickhouse_insert now streams TabSeparated through one chunked HTTP
      request per call (optionally gzip level 1). Rows may be arrayrefs or
      hashrefs (with an empty column list). clickhouse_insert_chunk now means
      rows per HTTP chunk (default 100000); clickhouse_insert_rows_per_request
      splits a call into several requests. insert_format => 'legacy' keeps
      the 0.02 JSONEachRow path.
    - execute_array on plain "INSERT ... VALUES (?, ?, ...)" uses the same
      TSV body.
    - A die in a coderef producer aborts the request so nothing is
      committed (for bodies below max_insert_block_size; larger streamed
      inserts can commit earlier blocks, see LIMITATIONS).
    Fixes
    - UInt64/Int64/Bool columns no longer force the slow per-cell decoder
      (the compiled row program now handles them).
    - TSV rows that are a single empty string are no longer returned as
      zero-column rows.
    Defaults
    - compression now defaults to off for loopback hosts (localhost,
      127.0.0.0/8, ::1) and on otherwise. compression=1 restores 0.02.
    Tests
    - New t/ suite: unit tests plus live tests gated on
      DBD_CLICKHOUSE_TEST_DSN that use <db>.DBD_CH_Test_* scratch tables.

0.02  2026-10-23
    - Baseline imported as git tag v0.02.
