Documentation
¶
Overview ¶
Package conformance is the cross-provider differential conformance suite for the committed read-path IR subset. Every case is evaluated by the reference interpreter (core/relalg/interp, the oracle defined by docs/design/ir-semantics.md) and by a real provider through codegen.Renderer; results must be equal after canonical normalization.
The equivalence corpus deliberately avoids the documented deviations listed in the spec (NULL sort placement, collation case folding, non-terminating averages, type-boundary overflow).
Index ¶
- Constants
- func Fixture() interp.DB
- func Qualified(schema string) string
- func Run(t *testing.T, db store.DB, d dialect.Dialect, schema string)
- func RunWorkload(t *testing.T, db store.DB, d dialect.Dialect, cfg workload.Config, ...)
- func Setup(ctx context.Context, db store.DB, d dialect.Dialect, schema string) error
- func SetupStatements(dialectName, schema string) []string
- func SetupWorkload(ctx context.Context, db store.DB, d dialect.Dialect, cfg workload.Config, ...) error
- type Case
Constants ¶
const TableName = "conf_t"
TableName is the single fixture relation.
Variables ¶
This section is empty.
Functions ¶
func Qualified ¶
Qualified returns the schema-qualified table name ("schema.conf_t"), or the bare name when schema is empty.
func Run ¶
Run executes the whole corpus differentially: interpreter result vs the provider executing codegen output. Any mismatch is a conformance failure; per the spec it must be fixed or promoted to a documented deviation (and the corpus adjusted) — never silently accepted.
func RunWorkload ¶ added in v0.1.9
RunWorkload checks the workload fixture differentially: for every table, a checksum aggregate (row count, per-numeric-column sums, per-nullable- column non-NULL counts) is evaluated by the reference interpreter over the generated rows and by the provider through codegen. Equal results on all providers prove the same governed queries see the same logical data (design doc acceptance #6). String content and date values stay out of the checksums: collation and date rendering are documented deviations.
func Setup ¶
Setup creates and seeds the fixture table. Statements run one by one: MySQL-family drivers reject multi-statement strings.
func SetupStatements ¶
SetupStatements returns the DDL and seed statements for the given dialect family ("postgres" or the MySQL family used by MySQL and OceanBase). Each statement must be executed separately: MySQL drivers reject multi-statement strings by default.
func SetupWorkload ¶ added in v0.1.9
func SetupWorkload(ctx context.Context, db store.DB, d dialect.Dialect, cfg workload.Config, schema string) error
SetupWorkload loads the fixtures/v4 business workload into db under the given schema (empty for the connection's default database). The generator renders the same deterministic data for every dialect; statements run one by one (MySQL-family drivers reject multi-statement strings).