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

[BUG] Chunked ORC writer throws in close() if not tables have been written successfully #15386

Closed
vuule opened this issue Mar 25, 2024 · 0 comments · Fixed by #15393
Closed
Labels
bug Something isn't working cuIO cuIO issue

Comments

@vuule
Copy link
Contributor

vuule commented Mar 25, 2024

finish_statistic_blobs in close throws because the footer is empty, and several vector sizes are based on footer.types.size() - 1.

Proposal:
We should not perform the actions in close if no data was written successfully. Ideally we would not write anything to the sink in such case.

@vuule vuule added bug Something isn't working cuIO cuIO issue labels Mar 25, 2024
rapids-bot bot pushed a commit that referenced this issue Apr 2, 2024
…ritten (#15393)

Closes #15386, #15387

The fixes for the two issues overlap, so I included both in a single PR.

Expanded the `_closed` flag to an enum that tracks if the operations in `close()` should be performed (one or more tables were written to the sink). This way, we don't perform the steps in close when there is no valid file to write the footer for. 
This includes:

- No `write` calls;
- All `write` calls failed;

The new enum replaces `skip_close()` that used to fix this issue for a smaller subset of cases.

Additionally, writing of the ORC header has been moved after the encode and uses the new state to only write the header in the first `write` call. This way we don't write anything to the sink if there were no `write` calls with the writer, and if the encode failed in the `write`s.

Authors:
  - Vukasin Milovanovic (https://github.com/vuule)
  - Nghia Truong (https://github.com/ttnghia)

Approvers:
  - Nghia Truong (https://github.com/ttnghia)
  - David Wendt (https://github.com/davidwendt)

URL: #15393
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuIO cuIO issue
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant