Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
picodata
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
picodata
Commits
cad63288
Commit
cad63288
authored
2 years ago
by
Arseniy Volynets
Browse files
Options
Downloads
Patches
Plain Diff
refactor: rename conjuct to disjuct and vice versa
parent
e4ff698a
No related branches found
No related tags found
1 merge request
!1414
sbroad import
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
sbroad-core/src/executor/bucket.rs
+9
-9
9 additions, 9 deletions
sbroad-core/src/executor/bucket.rs
with
9 additions
and
9 deletions
sbroad-core/src/executor/bucket.rs
+
9
−
9
View file @
cad63288
...
...
@@ -45,7 +45,7 @@ impl Buckets {
/// Disjunction of two sets of buckets.
#[must_use]
pub
fn
dis
ju
n
ct
(
&
self
,
buckets
:
&
Buckets
)
->
Buckets
{
pub
fn
con
juct
(
&
self
,
buckets
:
&
Buckets
)
->
Buckets
{
match
(
self
,
buckets
)
{
(
Buckets
::
All
,
Buckets
::
All
)
=>
Buckets
::
All
,
(
Buckets
::
Filtered
(
b
),
Buckets
::
All
)
|
(
Buckets
::
All
,
Buckets
::
Filtered
(
b
))
=>
{
...
...
@@ -59,7 +59,7 @@ impl Buckets {
/// Conjunction of two sets of buckets.
#[must_use]
pub
fn
con
junct
(
&
self
,
buckets
:
&
Buckets
)
->
Buckets
{
pub
fn
dis
junct
(
&
self
,
buckets
:
&
Buckets
)
->
Buckets
{
match
(
self
,
buckets
)
{
(
Buckets
::
All
,
_
)
|
(
_
,
Buckets
::
All
)
=>
Buckets
::
All
,
(
Buckets
::
Filtered
(
a
),
Buckets
::
Filtered
(
b
))
=>
{
...
...
@@ -170,7 +170,7 @@ where
}
else
{
Ok
(
buckets
.into_iter
()
.fold
(
Buckets
::
new_all
(),
|
a
,
b
|
a
.
dis
ju
n
ct
(
&
b
)))
.fold
(
Buckets
::
new_all
(),
|
a
,
b
|
a
.
con
juct
(
&
b
)))
}
}
...
...
@@ -185,14 +185,14 @@ where
// We need to pop back the chain to get nodes in the bottom-up order.
while
let
Some
(
node_id
)
=
nodes
.pop_back
()
{
let
node_buckets
=
self
.get_buckets_from_expr
(
node_id
)
?
;
chain_buckets
=
chain_buckets
.
dis
ju
n
ct
(
&
node_buckets
);
chain_buckets
=
chain_buckets
.
con
juct
(
&
node_buckets
);
}
result
.push
(
chain_buckets
);
}
if
let
Some
((
first
,
other
))
=
result
.split_first_mut
()
{
for
buckets
in
other
{
*
first
=
first
.
con
junct
(
buckets
);
*
first
=
first
.
dis
junct
(
buckets
);
}
return
Ok
(
first
.clone
());
}
...
...
@@ -345,7 +345,7 @@ where
.to_string
(),
)
})
?
;
let
buckets
=
first_buckets
.
con
junct
(
second_buckets
);
let
buckets
=
first_buckets
.
dis
junct
(
second_buckets
);
self
.bucket_map
.insert
(
*
output
,
buckets
);
}
else
{
return
Err
(
SbroadError
::
UnexpectedNumberOfValues
(
...
...
@@ -382,7 +382,7 @@ where
let
filter_id
=
*
filter
;
let
filter_buckets
=
self
.get_expression_tree_buckets
(
filter_id
)
?
;
self
.bucket_map
.insert
(
output_id
,
child_buckets
.
dis
ju
n
ct
(
&
filter_buckets
));
.insert
(
output_id
,
child_buckets
.
con
juct
(
&
filter_buckets
));
}
Relational
::
InnerJoin
{
children
,
...
...
@@ -423,8 +423,8 @@ where
self
.bucket_map
.insert
(
output_id
,
inner_buckets
.
con
junct
(
&
outer_buckets
)
.
dis
ju
n
ct
(
&
filter_buckets
),
.
dis
junct
(
&
outer_buckets
)
.
con
juct
(
&
filter_buckets
),
);
}
else
{
return
Err
(
SbroadError
::
UnexpectedNumberOfValues
(
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment