Skip to content

Test tablock and query options interaction#679

Open
Benjamin-Knight wants to merge 4 commits into
dbt-msft:masterfrom
Benjamin-Knight:test/tablock-query-options-interaction
Open

Test tablock and query options interaction#679
Benjamin-Knight wants to merge 4 commits into
dbt-msft:masterfrom
Benjamin-Knight:test/tablock-query-options-interaction

Conversation

@Benjamin-Knight
Copy link
Copy Markdown
Collaborator

Add an additional test that cover the interaction between two other pulls that add keywords to generated queries.

…t#613).

Supports a dict form (allowlisted hints; MAX_GRANT_PERCENT / MIN_GRANT_PERCENT
use `=` syntax) and a query_options_raw escape hatch. Honoured on table,
incremental (delete+insert, merge, microbatch), snapshot, and unit_test
materializations; view raises a compiler error if set. apply_label() is
preserved as a backward-compat alias emitting only the LABEL hint.
Enables minimal logging on bulk insert into pre-created tables when the
database is in SIMPLE or BULK_LOGGED recovery. Only the contract-enforced
branch of sqlserver__create_table_as is affected; the non-contract
SELECT * INTO path is unchanged. Adds a functional test asserting the
hint appears in compiled SQL and updates the two BaseConstraints*
expected_sql fixtures to match.
…t-msft#613).

A contract-enforced table model with query_options emits both
`WITH (TABLOCK)` on the INSERT target and the `OPTION (...)` query hint
on the SELECT side. This test only makes sense once both features are
present, so it lives on a dedicated branch that merges dbt-msft#640 and dbt-msft#613.
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