We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b25773 commit 7201f80Copy full SHA for 7201f80
src/snowflake/snowpark/dataframe.py
@@ -293,12 +293,8 @@ def _alias_if_needed(
293
)
294
return col.alias(f'"{prefix}{unquoted_col_name}"')
295
else:
296
- # No alias needed when source name equals destination name.
297
- # Populate expr_to_alias directly instead of creating redundant Alias expression.
298
- # This avoids generating "A" AS "A" in SQL while still maintaining column tracking.
299
- quoted_name = quote_name(unquoted_col_name)
300
- df._plan.expr_to_alias[col._expression.expr_id] = quoted_name
301
- return col
+ # Removal of redundant aliases (like `"A" AS "A"`) is handled at the analyzer level.
+ return col.alias(f'"{unquoted_col_name}"')
302
303
304
def _populate_expr_to_alias(df: "DataFrame") -> None:
0 commit comments