-
Notifications
You must be signed in to change notification settings - Fork 67
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
DONT MERGE. Vam. #4823
DONT MERGE. Vam. #4823
Conversation
@@ -0,0 +1,23 @@ | |||
package vector | |||
|
|||
type Nullmask []byte //XXX change to uint64 |
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.
How about
type Nullable struct {
mask []byte
vector Any
}
Then we don't have to embed the null mask in every other type.
if val == nil { | ||
nullslots = append(nullslots, uint32(len(vals))) | ||
} else { | ||
vals = append(vals, zed.DecodeString(val)) |
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.
zed.DecodeString(val)
If I'm reading this right this is not a copy - all the resulting strings share the same underlying byte buffer?
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.
That's what we want but there's an implicit copy here as the compiler will insert a call to runtime.slicebytetostring when it sees this. Our usual way around that is this: https://github.com/brimdata/zed/blob/40639dce6c333da1c55844b026052dc3718cc2d2/pkg/byteconv/byteconv.go#L11-L16
Notes:
|
(I'm just opening this to get the review ui).