Skip to content

Commit

Permalink
fix failure
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-yzou committed Sep 16, 2024
1 parent 5357951 commit a1bed4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/snowflake/snowpark/_internal/analyzer/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ def derive_dependent_columns_with_duplication(
"""
result = []
for exp in expressions:
result.extend(exp.dependent_column_names_with_duplication())
if exp is not None:
result.extend(exp.dependent_column_names_with_duplication())
return result


Expand Down Expand Up @@ -326,7 +327,8 @@ def dependent_column_names(self) -> Optional[AbstractSet[str]]:
def dependent_column_names_with_duplication(self) -> List[str]:
return (
[]
if self._dependent_column_names == COLUMN_DEPENDENCY_ALL
if (self._dependent_column_names == COLUMN_DEPENDENCY_ALL)
or (self._dependent_column_names is None)
else list(self._dependent_column_names)
)

Expand Down
2 changes: 1 addition & 1 deletion src/snowflake/snowpark/_internal/analyzer/grouping_set.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def dependent_column_names(self) -> Optional[AbstractSet[str]]:
flattened_args = [exp for sublist in self.args for exp in sublist]
return derive_dependent_columns(*flattened_args)

def dependent_column_names_with_duplication(self) -> list[str]:
def dependent_column_names_with_duplication(self) -> List[str]:
flattened_args = [exp for sublist in self.args for exp in sublist]
return derive_dependent_columns_with_duplication(*flattened_args)

Expand Down

0 comments on commit a1bed4b

Please sign in to comment.