NAME

DBIO::ClickHouse::Test::Schema::Probe - Test result class -- one column per branch of the DDL type map

VERSION

version 0.900004

DESCRIPTION

One column for every branch "Type mapping" in DBIO::ClickHouse::DDL can take. This table exists so that deploying DBIO::ClickHouse::Test::Schema is itself the answer to "does the server accept every type this driver can emit", without a single assertion being written: a rejected type is a failed CREATE TABLE, and a type the catalog reports back differently is a phantom diff in t/30-deploy.t.

The columns, and the decision each one carries:

  • the integer widths -- the map is width-preserving rather than one-size-fits-all Int64, and extra => { unsigned => 1 } selects the UInt* counterpart.

  • flag -- boolean maps to Bool, not UInt8. Bool is an alias for UInt8 inside the engine, so the whole mapping only holds if the catalog reports the alias back. t/18-types-live.t asserts exactly that.

  • d_wide / d_narrow -- portable date maps to Date32 (1900-2299) while the exact native spelling 'Date' reaches the two-byte type that starts at 1970. Both must exist for the escape hatch to be reachable.

  • ts_ms / ts_sec / ts_utc -- the same rule for DateTime64(3) vs native DateTime, plus the timezone-in-the-type form.

  • state -- an enum member containing an apostrophe, so the \' escaping "quote_string" in DBIO::ClickHouse::DDL::Emit emits is executed by the server rather than only pinned offline.

  • s_fixed -- FixedString(N) is opt-in and pads with zero bytes, which is the reason it is never inferred from char(N).

  • title / counter -- a scalar default_value renders as a quoted literal, a SCALAR ref verbatim; both have to survive the round trip through system.columns.default_expression.

JSON is deliberately not here. It is the one type in the map whose availability depends on the server version and on an experimental setting, so a server that rejects it would take the entire schema -- and therefore every live test file -- down with it. It is probed on its own table in t/18-types-live.t instead.

AUTHOR

DBIO Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.