Skip to content

Commit

Permalink
Merge branch 'tickets/DM-31700'
Browse files Browse the repository at this point in the history
  • Loading branch information
taranu committed Sep 9, 2021
2 parents 530e5d5 + 0cca1c5 commit 6087c88
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions doc/changes/DM-31700.bugfix.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix parquet formatter error when reading tables with no indices.

Previously, this would cause butler.get to fail to read valid parquet tables.
2 changes: 1 addition & 1 deletion python/lsst/daf/butler/formatters/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def __init__(self, path: str):
self.file = pq.ParquetFile(path)
self.md = json.loads(self.file.metadata.metadata[b"pandas"])
indexes = self.md["column_indexes"]
if len(indexes) == 1:
if len(indexes) <= 1:
self.columns = pd.Index(
name for name in self.file.metadata.schema.names if not name.startswith("__")
)
Expand Down

0 comments on commit 6087c88

Please sign in to comment.