Skip to content

Commit

Permalink
[parquet] stringify source to handle both URLs and local paths
Browse files Browse the repository at this point in the history
Stringify the source path that we feed into `pq.read_table`. This
produces consistent results for local paths and URLs, where using a
`visidata.Path` directly tries to load the underlying `pathlib.Path`
object at `_path`.
  • Loading branch information
ajkerrigan authored and saulpw committed Jun 8, 2023
1 parent 069fdbc commit 321bdbf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visidata/loaders/parquet.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def iterload(self):
pq = vd.importExternal('pyarrow.parquet', 'pyarrow')
from visidata.loaders.arrow import arrow_to_vdtype

self.tbl = pq.read_table(self.source)
self.tbl = pq.read_table(str(self.source))
self.columns = []
for colname, col in zip(self.tbl.column_names, self.tbl.columns):
c = ParquetColumn(colname,
Expand Down

0 comments on commit 321bdbf

Please sign in to comment.