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

DONT MERGE. Vam. #4823

Closed
wants to merge 8 commits into from
Closed

DONT MERGE. Vam. #4823

wants to merge 8 commits into from

Conversation

jamii
Copy link
Contributor

@jamii jamii commented Oct 25, 2023

(I'm just opening this to get the review ui).

fix problem where loading vector and looking up were confounded..
now there is clean separation and a vector path is loaded on demand
and the leaf is returned

handle dotted paths
vector/array.go Show resolved Hide resolved
vector/record.go Show resolved Hide resolved
@@ -0,0 +1,23 @@
package vector

type Nullmask []byte //XXX change to uint64
Copy link
Contributor Author

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))
Copy link
Contributor Author

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?

Copy link
Member

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

@jamii
Copy link
Contributor Author

jamii commented Oct 25, 2023

Notes:

  • Adds a command that tests the aggs.
  • Alters the project command to use vectors.
  • Adds a VecScan op which projects some paths.
    • Exec in compiler/kernel/op
    • Work happens in VecScanner
  • Adds some hacky aggregate ops.
    • (Ignoring these for now)
  • Adds vcache to lake.
  • Adds Index - a selection vector.
    • Adds commented out materialization code.
  • vam/projection splits into vectors by type (should be replaced by producing Union vector where appropriate)
  • Adds VecScanner.
    • parent feeds lake uris
    • (Don't follow the cancellation logic yet)
    • Loads a vector for each (type, path) combo
      • Probably path should include union branches instead.
  • Changes vcache loading code to call loadVector.
    • array/set (only handles ints)
    • map
    • nulls (not finished)
    • object (on demand?)
    • primitives (only a few types)
      • stored as zng plus precomputed offsets
      • commented out code for dictionary compression?
    • records (comment about missing locking?)
    • union
  • Adds a mutex to vcache cache fetch.
  • Deletes old vcache projection code.
  • Comments out vcache reader.
  • Adds vector.
    • Any is the interface.
    • Builder takes a zcode.Builder and adds 1 value to it.
      • (zcode.Builder just helps track lengths of nested trees in zng)
    • mem ???
    • Const probably needs a length field.
    • String vector

@jamii jamii closed this Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants