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
5 changes: 4 additions & 1 deletion pydough/conversion/join_aggregate_transpose.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,7 @@ def join_aggregate_transpose(
# other input to the join, as these shall be the two inputs to the new
# join.
agg_input: RelationalNode = aggregate.inputs[0]

non_agg_input: RelationalNode = (
join.inputs[1] if is_left_agg else join.inputs[0]
)
Expand All @@ -301,7 +302,9 @@ def join_aggregate_transpose(
# conflicts.
for col_name, col_expr in agg_input.columns.items():
join_name = self.generate_name(col_name, new_join_columns)
new_join_columns[join_name] = add_input_name(col_expr, agg_alias)
new_join_columns[join_name] = ColumnReference(
col_name, col_expr.data_type, agg_alias
)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add a comment about this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's a comment already in the code, above the loop.


# Add substitution remappings for the aggregate's output columns so that
# they are correctly renamed as regular references in the final
Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -1046,13 +1046,15 @@ def _impl(database_name: str) -> DatabaseContext:
"donor",
"movielens",
"california_schools",
"chinook",
]
"""
Contains the name of all the custom datasets that will be used for testing.
This includes the datasets from S3 and initialized with a .sql file.
"""
S3_DATASETS_SCRIPTS = {
"world_development_indicators": "init_world_indicators_sqlite",
"chinook": "init_chinook_sqlite",
}
"""
Maps the datasets that need to be built with a sql script, with the name of
Expand Down
Loading
Loading