GH-34807: [Go] Handle io.EOF when reading parquet footer size and magic bytes#34808
Conversation
|
|
|
Is there more you intend to do here? I'd say that a unit test which uses an implementation that returns the io.EOF and confirms this fixes it would be good. Otherwise this seems fine to me if you think it's ready for review. |
I added a test. I wasn't sure of the best way to get a buffer to an underlying valid parquet file for testing purposes, so I pieced together things from other tests -- let me know if there's a better way. |
| "github.com/apache/arrow/go/v12/parquet" | ||
| "github.com/apache/arrow/go/v12/parquet/schema" | ||
| "github.com/stretchr/testify/require" |
There was a problem hiding this comment.
can you run go fmt on this / goimports so it reorders the imports sorting them appropriately? that's likely what's causing the failing dev script CI tests, these are getting ordered differently resulting in the diffs not being what is expected.
There was a problem hiding this comment.
I should really add a workflow for the bot to auto-run the formatting like we have for C++ and clang-format...
There was a problem hiding this comment.
Done! Thanks for the pointer.
I should really add a workflow for the bot to auto-run the formatting like we have for C++ and clang-format...
I can take a look if you guys need help on the go front :-)
There was a problem hiding this comment.
Hmm, still have failing checks, I ran:
go fmt -d file_reader.go file_reader_test.go and see no diffs 🤔
There was a problem hiding this comment.
you needed to remove the empty line and then use goimports to sort the imports. I've done so and pushed the fix.
There was a problem hiding this comment.
Ah, thanks for fixing.
|
@agchang the import order / Thanks again for this! |
|
Benchmark runs are scheduled for baseline = 2e6c13d and contender = e50729a. e50729a is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
… and magic bytes (apache#34808) * Closes: apache#34807 Lead-authored-by: Andy Chang <achang@arize.com> Co-authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
… and magic bytes (apache#34808) * Closes: apache#34807 Lead-authored-by: Andy Chang <achang@arize.com> Co-authored-by: Matt Topol <zotthewizard@gmail.com> Signed-off-by: Matt Topol <zotthewizard@gmail.com>
io.ReaderAtimplementations #34807