Conversation
Three Athena-specific gaps in the unit-test path, found by running a real project's 31 unit tests against Athena: - Schema inference: the default path materializes an empty temporary table via CTAS and introspects it. On Athena a zero-row Hive CTAS yields a table with no accessible columns (`COLUMN_NOT_FOUND: Relation contains no accessible columns`), and the probe would land under `s3_staging_dir/tables/`. Athena joins DuckDB and ClickHouse on the query-schema path: the driver returns the result-set schema for `... where false limit 0`. - Type names: the Arrow-to-SQL conversion table emitted Postgres spellings for Athena (`text`, `float8`, `timestamp without time zone`), which Trino rejects. Athena now maps to `varchar`, `double`, `timestamp`, in line with dbt-athena's convert_*_type (whose `string` is a Hive DDL spelling that the vendored `ddl_data_type` macro produces where DDL needs it). - Integer widths: the table collapses every integer width into one name per backend. Trino's `integer` is 32-bit, so bigint fixtures overflowed (`NUMERIC_VALUE_OUT_OF_RANGE`). Athena keeps `bigint` / `integer` / `smallint` / `tinyint`. Also fills the Athena arm of `get_field_sql_type_metadata_key` with the `ATHENA:type` key the driver emits (dbt-labs/athena#6). Against the real project, 15 of 31 unit tests pass; the rest fail on an upstream table that does not exist in that environment (10) and on refs without a `given` fixture (6), which dbt-core resolves to the real relation and Fusion refuses.
This was referenced Sep 18, 2026
This was referenced Sep 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #16252. Related: #13822. Independent PR; the sequence is at the bottom.
Problem
Three Athena-specific gaps in the unit-test path, found by running a real project's 31 unit tests:
COLUMN_NOT_FOUND: Relation contains no accessible columns), and the probe would land unders3_staging_dir/tables/.text,float8,timestamp without time zone), which Trino rejects.integeris 32-bit, sobigintfixtures overflowed (NUMERIC_VALUE_OUT_OF_RANGE).Solution
... where false limit 0.sql_types: Athena maps tovarchar,double,timestamp, in line with dbt-athena'sconvert_*_type;bigint/integer/smallint/tinyintare kept distinct.get_field_sql_type_metadata_keyAthena arm returnsATHENA:type, the key the driver emits.Verification
cargo fmt --check,cargo clippy -p dbt-adapter,cargo nextest run -p dbt-adapter -E 'test(athena)'clean on the pinned toolchain.givenfixture, which dbt-core resolves to the real relation and Fusion refuses). The latter is a documented Fusion/core difference, not raised here.Feedback wanted: none beyond the code.
Sequence (independent PRs, each compiles alone against main)
table/incrementalhelpers (athena/parts-6-7-execution); see also feat(athena): Part 6 — AthenaAdapter methods behind the dbt-athena macros #16376Checklist