Skip to content

Commit

Permalink
bugfix when existing idx is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
bobokvsky committed Nov 2, 2024
1 parent 8055860 commit a855a83
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion datapipe/meta/sql_meta.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def get_existing_idx(self, idx: Optional[IndexDF] = None) -> IndexDF:
# Empty index -> empty result
return cast(
IndexDF,
pd.DataFrame(columns=[column.name for column in self.sql_schema]), # type: ignore
pd.DataFrame(columns=self.primary_keys), # type: ignore
)
idx_cols = list(set(idx.columns.tolist()) & set(self.primary_keys))
else:
Expand Down

0 comments on commit a855a83

Please sign in to comment.