Skip to content

Commit

Permalink
Revert "feat: raise error in from_parquet when df is empty"
Browse files Browse the repository at this point in the history
  • Loading branch information
d0choa authored Nov 22, 2023
1 parent e5e9f29 commit edbbebb
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/otg/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,14 +84,9 @@ def from_parquet(
Returns:
Self: Dataset with the parquet file contents
Raises:
ValueError: Parquet file is empty
"""
schema = cls.get_schema()
df = session.read_parquet(path=path, schema=schema, **kwargs)
if df.isEmpty():
raise ValueError(f"Parquet file is empty: {path}")
return cls(_df=df, _schema=schema)

def validate_schema(self: Dataset) -> None:
Expand Down

0 comments on commit edbbebb

Please sign in to comment.