Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

skip empty files in read_bytes.py #1993

Merged
merged 1 commit into from
Aug 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions python/vineyard/drivers/io/adaptors/read_bytes.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@
path = parts[0]
if len(parts) > 1:
options = parts[1]
for split_by_hashtap in options.split('#'):

Check warning on line 131 in python/vineyard/drivers/io/adaptors/read_bytes.py

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (hashtap)
for split_by_ampersand in split_by_hashtap.split('&'):

Check warning on line 132 in python/vineyard/drivers/io/adaptors/read_bytes.py

View workflow job for this annotation

GitHub Actions / Spell Check with Typos

Unknown word (hashtap)
k, v = split_by_ampersand.split('=')
read_options[k] = v

Expand Down Expand Up @@ -180,6 +180,12 @@
try:
for index, file_path in enumerate(files):
with fs.open(file_path, mode="rb") as fp:
try:
total_size = fp.size()
except TypeError:
total_size = fp.size
if total_size == 0:
continue
offset = 0
offset_adjustment = 0
# Only process header line when processing first file
Expand Down
Loading