Skip to content

feat(e6): SUBQUERY_TREE_MULTIDIALECT flag for the subtree on the planner's multidialect path - #338

Merged
tkaunlaky-e6 merged 1 commit into
mainfrom
feat/subtree-multidialect-flag
Nov 19, 2026
Merged

tkaunlaky-e6 merged 1 commit into
mainfrom
feat/subtree-multidialect-flag

Conversation

@tkaunlaky-e6

Copy link
Copy Markdown

What

Adds the SUBQUERY_TREE_MULTIDIALECT env flag, which uses the subquery tree only on the planner's multidialect path. That is the behaviour SUBQUERY_TREE had before #337.

Env flag When the subtree runs
SUBQUERY_TREE=true Every query, whether or not the planner sends a flag (unchanged since #337)
SUBQUERY_TREE_MULTIDIALECT=true Only when the planner sends MULTIDIALECT: true (or SAMSUNG_TABLEAU_DASHBOARD=true); other queries take the normal single-dialect path
Neither The old multidialect split (split_pg_outer / split_custom_sql_alias)

SUBQUERY_TREE is already deployed with the every-query meaning, so it keeps that meaning.

Tests

  • The trigger test in tests/test_subquery_tree.py now covers all 8 combinations of SUBQUERY_TREE, SUBQUERY_TREE_MULTIDIALECT and the MULTIDIALECT flag.
  • make test and make test-rs: OK. make test-multidialect (Samsung / Condé Nast / OneTrust): OK.
  • ruff and ruff-format pass. The only mypy error is the missing generated sqlglot/_version.py, unrelated to this change.

…ner's multidialect path

SUBQUERY_TREE runs every query through the subquery tree. The new
SUBQUERY_TREE_MULTIDIALECT env flag uses the tree only when the planner sends the
MULTIDIALECT feature flag (or with Samsung), as SUBQUERY_TREE did before #337.
@tkaunlaky-e6
tkaunlaky-e6 merged commit 722f7c8 into main Nov 19, 2026
6 checks passed
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.

2 participants