Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ChengjieLi28 committed Oct 16, 2023
1 parent f7153f7 commit 40ee4f6
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,11 @@ def _get_successor_required_columns(self, data: TileableData) -> Set[Any]:
*[self._context[successor][data] for successor in successors]
)
# When getting the required columns of a DataFrameIndex node, we need to consider itself.
if isinstance(data.op, DataFrameIndex) and len(data.dtypes) > 0:
if (
isinstance(data, BaseDataFrameData)
and isinstance(data.op, DataFrameIndex)
and len(data.dtypes) > 0
):
res = res.union(set(data.dtypes.index))
return res

Check warning on line 68 in python/xorbits/_mars/optimization/logical/tileable/column_pruning/column_pruning_rule.py

View check run for this annotation

Codecov / codecov/patch

python/xorbits/_mars/optimization/logical/tileable/column_pruning/column_pruning_rule.py#L67-L68

Added lines #L67 - L68 were not covered by tests
else:
Expand Down

0 comments on commit 40ee4f6

Please sign in to comment.