-
Notifications
You must be signed in to change notification settings - Fork 66
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
pqarrow/arrowutils: Add sorting support for Struct, RunEndEncoded, FixedSizeBinary #936
Conversation
4751bc3
to
6e043a8
Compare
Hey @thorfour, any idea why |
Replace the assert with |
Done: |
dd0ae83
to
1ff59c3
Compare
This will also allow us to limit all the newly supported column types, timestamp, struct and runendencoded
Please take a look at this fix, @thorfour. I'm not sure why this started panicking now.
// The size can be 0 and in that case we don't want to sample. | ||
if s.size == 0 { | ||
return | ||
} |
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.
@thorfour, this sometimes panics all of a sudden.
Specifically line 189/193 with the rand.Intn(int(s.size)
.
I'm not sure why we're sometimes running into this now. But this guard at least stops the panic.
pqarrow/arrowutils/sort_test.go
Outdated
t.Run("List", func(t *testing.T) { | ||
mem := memory.NewGoAllocator() | ||
// mem := memory.NewCheckedAllocator(memory.NewGoAllocator()) |
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.
leftover?
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.
True. I tried to fix it and gave up. Let me take another look.
The RunEndEncoded part made my brain melt a couple of times. The Struct part is weird cause it always assumes the fields of a struct a multiple when creating the new struct array with
array.NewStructArray(cols, names)
, so I had to figure that out and adjust the schema. FixedSizeBinary is simple compared to the other two.