fix: emit query_options on table_refresh_method=dml refresh path#753
Open
Benjamin-Knight wants to merge 1 commit into
Open
fix: emit query_options on table_refresh_method=dml refresh path#753Benjamin-Knight wants to merge 1 commit into
Benjamin-Knight wants to merge 1 commit into
Conversation
sqlserver__table_dml_refresh never called get_query_options(), so query_options / query_options_raw (and the LABEL query tag) were silently dropped on every steady-state DML refresh — inconsistent with create_table_as, which honors them. Both grant-taking statements are affected: the scratch-build SELECT ... INTO and the swap INSERT ... SELECT. Hoist get_query_options(parse_options=True) once and append it to both statements (matching how create_table_as attaches it, including the trailing ';' it supplies). Add a regression test asserting the OPTION hint renders on BOTH DML statements. Only 'main' reaches target/run, so the test drives off the captured debug log and checks each statement bounded by its terminator, so a hint on one can't be mistaken for the other. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Emit query_options on the table_refresh_method: dml refresh path, resolve #752
The DML refresh materialization was dropping query_options / query_options_raw (and the LABEL query tag) on its two data-movement statements, so hints configured on a model only applied on the initial create and vanished on every steady-state refresh.
Changes:
No behavior change for models not using query_options or not on the DML path.