-
Notifications
You must be signed in to change notification settings - Fork 2
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
fix: allow the progress bars for reading ndjson to finish #315
Conversation
# See https://docs.delta.io/latest/delta-storage.html for advice | ||
# on which version of hadoop-aws to use. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but I realized that 3.3.4 was kind of a magic number unless you knew where to look.
if buf and buf[-1] != "\n": # catch a final line without a trailing newline | ||
if buf and buf[-1] != ord("\n"): # catch a final line without a trailing newline |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I forgot that buf was binary - this check never worked as intended, ahem
There was an off by one error if the last character of the ndjson file was a newline. This prevented some "reading" progress bars from every appearing finished. This was just cosmetic though - all data was read.
7079118
to
0a50986
Compare
@@ -153,14 +153,12 @@ def write_json(path: str, data: Any, indent: int = None) -> None: | |||
|
|||
|
|||
@contextlib.contextmanager | |||
# pylint: disable-next = contextmanager-generator-missing-cleanup |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unrelated, but also removed these disables - pylint fixed some false positives we were dealing with in their latest release: https://github.com/pylint-dev/pylint/releases/tag/v3.2.2
There was an off by one error if the last character of the ndjson file was a newline. This prevented some "reading" progress bars from every appearing finished.
This was just cosmetic though - all data was read.
Checklist
docs/
) needs to be updated