Used Query.add_annotation where appropriate.

This avoids manual .annotations and .append_annotation_mask manipulations.
This commit is contained in:
Simon Charette 2024-06-21 01:25:22 -04:00 committed by Sarah Boyce
parent d9bd58c3b8
commit 2a7497b036
1 changed files with 1 additions and 2 deletions

View File

@ -565,8 +565,7 @@ class Query(BaseExpression):
col_alias = f"__col{index}"
col_ref = Ref(col_alias, col)
col_refs[col] = col_ref
inner_query.annotations[col_alias] = col
inner_query.append_annotation_mask([col_alias])
inner_query.add_annotation(col, col_alias)
replacements[col] = col_ref
outer_query.annotations[alias] = aggregate.replace_expressions(
replacements