Skip to content

test(adapters): give each temporary function case a type its dialect accepts - #1342

Merged
kvlonge merged 2 commits into
mainfrom
test/databricks-temp-function-type
Nov 7, 2026
Merged

kvlonge merged 2 commits into
mainfrom
test/databricks-temp-function-type

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Why

The temporary-function rendering test declared order_status TEXT for every adapter. Its Databricks expectation therefore pinned CREATE OR REPLACE TEMPORARY FUNCTION ... (order_status TEXT), which Databricks refuses with UNSUPPORTED_DATATYPE, because TEXT is not a Databricks type.

SQLBuild itself was not affected. Function argument types pass through as declared, and the Waffle Shop playground and fixture both declare STRING. Compiling the fixture for Databricks renders (order_status STRING).

Changes

  • Each temporary-function test case declares an argument type that its dialect accepts: STRING for Databricks and BigQuery, TEXT for Postgres, Snowflake and SQL Server, VARCHAR for DuckDB.
  • The Databricks expectation now asserts (order_status STRING).

DuckShop: not applicable. This changes a unit-test input only; no project shape, data value or lifecycle is involved.

Verification

  • tests/unit/src/sqlbuild/adapter/contract/classes/strict_adapter passes (14 tests).
  • make check-ci, public-repository scan.

…accepts

The shared fixture declared the argument as TEXT for every adapter, so the
Databricks expectation pinned DDL that Databricks refuses. Each case now
declares a type valid in its dialect, and Databricks renders STRING.
@kvlonge
kvlonge enabled auto-merge (squash) November 7, 2026 09:15
@kvlonge
kvlonge merged commit 6ab4b38 into main Nov 7, 2026
24 checks passed
@kvlonge
kvlonge deleted the test/databricks-temp-function-type branch November 7, 2026 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant