Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ dependencies = [
"requests",
"rich[jupyter]",
"ruamel.yaml",
"sqlglot[rs]~=26.29.0",
"sqlglot[rs]~=26.30.0",
"tenacity",
"time-machine",
"json-stream"
Expand Down
2 changes: 2 additions & 0 deletions sqlmesh/core/dialect.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,12 +346,14 @@ def _parse_select(
table: bool = False,
parse_subquery_alias: bool = True,
parse_set_operation: bool = True,
consume_pipe: bool = True,
) -> t.Optional[exp.Expression]:
select = self.__parse_select( # type: ignore
nested=nested,
table=table,
parse_subquery_alias=parse_subquery_alias,
parse_set_operation=parse_set_operation,
consume_pipe=consume_pipe,
)

if (
Expand Down
2 changes: 2 additions & 0 deletions tests/core/test_macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,9 @@ def test_macro_var(macro_evaluator):

# Check Snowflake-specific StagedFilePath / MacroVar behavior
e = parse_one("select @x from @path, @y", dialect="snowflake")

macro_evaluator.locals = {"x": parse_one("a"), "y": parse_one("t2")}
macro_evaluator.dialect = "snowflake"

assert e.find(StagedFilePath) is not None
assert macro_evaluator.transform(e).sql(dialect="snowflake") == "SELECT a FROM @path, t2"
Expand Down