Skip to content

Commit 404754e

Browse files
committed
remove unreachable stars without table node handling - it's either raw star or star with table when prefixed with table name/alias - unreachable code
1 parent f718f3c commit 404754e

1 file changed

Lines changed: 0 additions & 5 deletions

File tree

sql_metadata/column_extractor.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,6 @@ def _handle_column(self, col: exp.Column, clause: str) -> None:
423423
if table:
424424
table = self._resolve_table_alias(table)
425425
c.add_column(f"{table}.*", clause)
426-
# TODO: revisit if Column(Star) without table
427-
else: # pragma: no cover
428-
c.add_column("*", clause)
429426
return
430427

431428
# Check for CTE column alias reference
@@ -578,8 +575,6 @@ def _collect_column_from_node(
578575
if table:
579576
table = self._resolve_table_alias(table)
580577
return f"{table}.*"
581-
# TODO: revisit if Column(Star) without table
582-
return "*" # pragma: no cover
583578
return self._column_full_name(child)
584579
if isinstance(child, exp.Star):
585580
if id(child) not in seen_stars and not isinstance(child.parent, exp.Column):

0 commit comments

Comments
 (0)