Skip to content

Commit

Permalink
fix rows schema mismatch (#3125)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoestq authored Jan 6, 2025
1 parent 30ae84d commit 5711204
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libs/libcommon/src/libcommon/parquet_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ class RowGroupReader:
features: Features

def read(self, columns: list[str]) -> pa.Table:
if not set(columns) <= set(self.parquet_file.schema_arrow.names):
if not set(self.parquet_file.schema_arrow.names) <= set(columns):
raise SchemaMismatchError(
f"Parquet files have different columns: {sorted(columns)} and {sorted(self.parquet_file.schema_arrow.names)}"
)
Expand Down

0 comments on commit 5711204

Please sign in to comment.