-
Notifications
You must be signed in to change notification settings - Fork 14
[v17] MB-27666: Nested Fields #339
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
Open
CascadingRadium
wants to merge
71
commits into
unstable-v17
Choose a base branch
from
nestedFields
base: unstable-v17
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
7b87224
Introducing Zapx V17
CascadingRadium 647ea3f
remove debug print statements
CascadingRadium 264f04e
Apply suggestions from code review
CascadingRadium df2401a
small error msg fix
CascadingRadium 782a36c
fix footer
CascadingRadium 1173c95
small fix in zap.md
CascadingRadium 4780ed1
bug fixes and new features.
CascadingRadium af6c696
Update nested_cache.go
CascadingRadium 3747c03
Update nested_cache.go
CascadingRadium e659767
Update merge.go
CascadingRadium aab8129
simplify
CascadingRadium a994bbd
Update nested_cache.go
CascadingRadium 78d68b4
Update nested_cache.go
CascadingRadium 9e51f9c
Update segment.go
CascadingRadium af9f3a4
Update segment.go
CascadingRadium 460e568
Update segment.go
CascadingRadium d459929
Update segment.go
CascadingRadium 45051aa
Update segment.go
CascadingRadium 43d0c99
comments
CascadingRadium 3fdd593
fix comments
CascadingRadium 6c7a1bc
fix count API part1
CascadingRadium 1070303
performance improvement
CascadingRadium 38ec1ef
gomod changes
CascadingRadium 2057857
cache improvement
CascadingRadium 85aa9c9
code review
CascadingRadium c98b0c5
add zapx.md
CascadingRadium 71b1151
add cmd line tooling
CascadingRadium 5b46683
Apply suggestions from code review
CascadingRadium 763ba00
reset to 16 for test
CascadingRadium 3a14cca
revert to 17
CascadingRadium 933cdfe
fix cmd line tool
CascadingRadium a091db2
Apply suggestions from code review
CascadingRadium c20a8b3
temp change to 16
CascadingRadium 21873f9
perf optimization
CascadingRadium 064c9a0
perf opt 3
CascadingRadium 77bf6e8
nestedCache v2
CascadingRadium 9c9f86b
cache optimization
CascadingRadium 9032692
use clear instead
CascadingRadium 43825ef
use uvarint
CascadingRadium 3d8762b
reuse edgeList
CascadingRadium 0e5ae09
add guard
CascadingRadium 43688ea
Apply suggestions from code review
CascadingRadium 0984d43
fix md
CascadingRadium ddf2d5a
Update github actions workflow (#350)
CascadingRadium b619c64
Moved vectorIndexWrapper implementations into a struct
Likith101 c73d9fc
Apply suggestion from @Copilot
abhinavdangeti 5425f7d
fix tests
CascadingRadium dbd7e53
fix tests
CascadingRadium 683ac3f
fix comments
CascadingRadium 52630c6
rebase
CascadingRadium 297d353
fix typos
CascadingRadium 4bbbd0d
resolve comments
CascadingRadium d0e645a
add explicit l2 case
CascadingRadium 466697a
rename var
CascadingRadium aa3db82
Addressing reviews
Likith101 df85930
Merge branch 'vecWrapper' into knnDup
CascadingRadium d04b0bd
change var name
CascadingRadium 6c506d8
Merge branch 'knnDup' into merge
CascadingRadium 7f8ab8d
Merge branch 'merge' into nestedFields
CascadingRadium c1fa881
knn support
CascadingRadium 72ccec0
fox reuse
CascadingRadium dd4db74
Minor improvements
Likith101 f86bbbf
Merge branch 'vecWrapper' into knnDup
CascadingRadium 4c50856
resolve comments
CascadingRadium 23bb1e5
Merge branch 'knnDup' into merge
CascadingRadium f6d6ad1
Merge branch 'merge' into nestedFields
CascadingRadium 2ffff1e
Minor bug fix
Likith101 8cb4bbd
Merge branch 'vecWrapper' into knnDup
CascadingRadium b4d5ebe
Merge branch 'knnDup' into merge
CascadingRadium ae9ef74
Merge branch 'merge' into nestedFields
CascadingRadium 7ca55d8
bug fix
CascadingRadium File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| // Copyright (c) 2025 Couchbase, Inc. | ||
| // | ||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
| // | ||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
| // | ||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| package cmd | ||
|
|
||
| import ( | ||
| "encoding/binary" | ||
| "fmt" | ||
|
|
||
| "github.com/spf13/cobra" | ||
| ) | ||
|
|
||
| // edgeListCmd represents the edge command | ||
| var edgeListCmd = &cobra.Command{ | ||
| Use: "edgeList", | ||
| Short: "prints the edge list for nested documents", | ||
| Long: `The edgeList command will print the edge list for nested documents in the segment.`, | ||
| RunE: func(cmd *cobra.Command, args []string) error { | ||
| edgeListAddr, err := segment.EdgeListAddr() | ||
| if err != nil { | ||
| return fmt.Errorf("error getting edge list: %v", err) | ||
| } | ||
| data := segment.Data() | ||
| // read edge list | ||
| // pos stores the current read position | ||
| pos := edgeListAddr | ||
| // read number of nested documents which is also the number of edges | ||
| numEdges, read := binary.Uvarint(data[pos : pos+binary.MaxVarintLen64]) | ||
| if read <= 0 { | ||
| return fmt.Errorf("error reading number of edges in nested edge list") | ||
| } | ||
| pos += uint64(read) | ||
| // if no edges or no nested documents, return | ||
| if numEdges == 0 { | ||
| fmt.Println("no nested documents present") | ||
| return nil | ||
| } | ||
| // edgeList as a map[node]parent | ||
| edgeList := make(map[uint64]uint64, numEdges) | ||
| for i := uint64(0); i < numEdges; i++ { | ||
| child, read := binary.Uvarint(data[pos : pos+binary.MaxVarintLen64]) | ||
| if read <= 0 { | ||
| return fmt.Errorf("error reading child doc id in nested edge list") | ||
| } | ||
| pos += uint64(read) | ||
| parent, read := binary.Uvarint(data[pos : pos+binary.MaxVarintLen64]) | ||
| if read <= 0 { | ||
| return fmt.Errorf("error reading parent doc id in nested edge list") | ||
| } | ||
| pos += uint64(read) | ||
| edgeList[child] = parent | ||
| } | ||
| // print number of edges / nested documents | ||
| fmt.Printf("number of edges / nested documents: %d\n", len(edgeList)) | ||
| fmt.Printf("child document number -> parent document number\n") | ||
| for child, parent := range edgeList { | ||
| fmt.Printf("%d -> %d\n", child, parent) | ||
| } | ||
| return nil | ||
| }, | ||
| } | ||
|
|
||
| func init() { | ||
| RootCmd.AddCommand(edgeListCmd) | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.