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 bigframes/core/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -1627,7 +1627,7 @@ class ResultNode(UnaryNode):
# TODO: CTE definitions

def _validate(self):
for ref, name in self.output_cols:
for ref, _ in self.output_cols:
assert ref.id in self.child.ids

@property
Expand Down
4 changes: 3 additions & 1 deletion bigframes/core/rewrite/identifiers.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ def remap_variables(
new_root = root.transform_children(lambda node: remapped_children[node])

# Step 3: Transform the current node using the mappings from its children.
# "reversed" is required for InNode so that in case of a duplicate column ID,
# the left child's mapping is the one that's kept.
downstream_mappings: dict[identifiers.ColumnId, identifiers.ColumnId] = {
k: v for mapping in new_child_mappings for k, v in mapping.items()
k: v for mapping in reversed(new_child_mappings) for k, v in mapping.items()
}
if isinstance(new_root, nodes.InNode):
new_root = typing.cast(nodes.InNode, new_root)
Expand Down
4 changes: 2 additions & 2 deletions tests/system/small/engines/test_join.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def test_engines_join_on_coerced_key(
assert_equivalence_execution(result.node, REFERENCE_ENGINE, engine)


@pytest.mark.parametrize("engine", ["polars", "bq"], indirect=True)
@pytest.mark.parametrize("engine", ["polars", "bq", "bq-sqlglot"], indirect=True)
@pytest.mark.parametrize("join_type", ["left", "inner", "right", "outer"])
def test_engines_join_multi_key(
scalars_array_value: array_value.ArrayValue,
Expand Down Expand Up @@ -90,7 +90,7 @@ def test_engines_cross_join(
assert_equivalence_execution(result.node, REFERENCE_ENGINE, engine)


@pytest.mark.parametrize("engine", ["polars", "bq"], indirect=True)
@pytest.mark.parametrize("engine", ["polars", "bq", "bq-sqlglot"], indirect=True)
@pytest.mark.parametrize(
("left_key", "right_key"),
[
Expand Down
2 changes: 1 addition & 1 deletion tests/system/small/engines/test_slicing.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
REFERENCE_ENGINE = polars_executor.PolarsExecutor()


@pytest.mark.parametrize("engine", ["polars", "bq"], indirect=True)
@pytest.mark.parametrize("engine", ["polars", "bq", "bq-sqlglot"], indirect=True)
@pytest.mark.parametrize(
("start", "stop", "step"),
[
Expand Down