About this project
The Driver Validation Suite is a reusable, pluggable test framework for validating ADBC (Arrow Database Connectivity) drivers, built with Python and the pytest testing library. It exercises various ADBC features and data types by running SQL queries against target drivers, and generates documentation tables that list supported and unsupported features. The suite can accommodate database-specific syntax and behavioral quirks.
Test cases are organized under the queries/base directory, with each individual test consisting of all files in a single directory that share a base filename. The suite supports three core query types:
1. SELECT queries: Test running a query and validating its result, composed of a query.sql file, expected result schema (query.schema.json), expected result data in JSON Lines (query.json), plus optional setup SQL, bind parameter data, bind schema, and bind query files.
2. Schema queries: Test retrieving the result set schema of a query without executing it, requiring only query.sql and the expected schema file.
3. Ingest queries: Test bulk ingestion of Arrow data followed by querying the loaded table, requiring input schema and data files, with optional expected result schema and data.
All test cases can include an optional query.toml metadata file to control test behavior and documentation output: the hide flag skips running the test entirely for a driver, the skip flag marks the test as unsupported with a provided reason, sort-keys defines columns to sort result sets by before comparison, and tags can add caveats, mark partial support, or specify the SQL type name for documentation.
Drivers can override base test cases with driver-specific adjustments by placing files at the same relative path in their designated quirks directory, avoiding the need to duplicate full test cases. As an alternative to separate per-file test definitions, a single .txtcase file can be used, with // part: comments marking which section corresponds to which original file type. .txtcase files cannot be mixed with separate files for the same test case, as this will cause test discovery errors.
The project notes that formal documentation is still in progress, and recommends users reference existing ADBC driver implementations to learn how to integrate the validation suite.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.