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

Replace recursive tree traversal #58

Merged
merged 25 commits into from
Mar 18, 2021
Merged
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
6ef3897
restructure test organization
wngr Mar 16, 2021
d989eaf
add non-recursive tree traversal
wngr Mar 16, 2021
245f3b2
replace iter_filtered_chunked0 with traverse0
wngr Mar 16, 2021
455185c
change stream_filtered_chunked to use traverse
wngr Mar 16, 2021
a105154
add DoubleEndedIter impl for ForestIter
wngr Mar 16, 2021
86a2f8b
add some more iter based convenience methods and cleanup
wngr Mar 16, 2021
da5b67b
honor offset passed into reverse traversal
wngr Mar 16, 2021
c91803c
dry forward and backward iteration
wngr Mar 16, 2021
02dde24
dont expose offset for reverse traversal
wngr Mar 17, 2021
6fb7563
add test comparing forward and reverse case
wngr Mar 17, 2021
2fea7fa
dont expose offset passing at all
wngr Mar 17, 2021
cab7d66
add another test
wngr Mar 17, 2021
99af728
use a common stack for both index and positions and try to dry up the
wngr Mar 17, 2021
05cc8fe
Add test for traversal of very deep trees
rklaehn Mar 17, 2021
8def1b9
Remove the scary 'outer
rklaehn Mar 17, 2021
276179f
Use empty filter as a marker that it still has to be initialized
rklaehn Mar 17, 2021
bf39759
Format new test
rklaehn Mar 17, 2021
9b5f2c5
clippy the tests
rklaehn Mar 17, 2021
3838ac5
Merge pull request #59 from Actyx/rkl/traversal-improvements
wngr Mar 17, 2021
8b871a5
remove DoubleEndedIterator impl
wngr Mar 17, 2021
ca2ebce
create non-empty range and dont reverse data items inside a chunk
wngr Mar 17, 2021
97fae3c
WIP
rklaehn Mar 17, 2021
e09ae96
Try using isize for position, so that it can be directly the position…
rklaehn Mar 17, 2021
f2ebf2a
Add comment about ordering of data in FilteredChunk
rklaehn Mar 18, 2021
e1b2c22
pr comments by @rkuhn
wngr Mar 18, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/target
*sqlite
target
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion banyan-utils/.gitignore

This file was deleted.

2 changes: 1 addition & 1 deletion banyan-utils/src/bin/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ async fn main() -> Result<()> {
}
Command::DumpValues { root } => {
let tree = forest.load_tree(root)?;
let iter = forest.iter_from(&tree, 0);
let iter = forest.iter_from(&tree);
for res in iter {
let (i, k, v) = res?;
println!("{:?} {:?} {:?}", i, k, v);
Expand Down
1 change: 1 addition & 0 deletions banyan/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ lru = "0.6.4"
maplit = "1.0.2"
rand = "0.8.3"
salsa20 = "0.7.2"
smallvec = "1.6.1"
tracing = "0.1.23"
zstd = "0.6.0"

Expand Down
1 change: 1 addition & 0 deletions banyan/src/forest/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ use std::{
mod read;
mod stream;
mod write;
pub(crate) use read::ForestIter;

pub type FutureResult<'a, T> = BoxFuture<'a, Result<T>>;

Expand Down
Loading