Skip to content

Commit 4e3f613

Browse files
zxqfd555Manul from Pathway
authored andcommitted
upgrade rust to 1.93 (#9808)
GitOrigin-RevId: 03adc30b908c227d0a6cdd59e5df6cf78d721a82
1 parent 7bb09f1 commit 4e3f613

File tree

4 files changed

+38
-33
lines changed

4 files changed

+38
-33
lines changed

.github/workflows/pull.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
env:
1212
PYTHON_VERSION: "3.11"
13-
RUST_TOOLCHAIN: "1.92.0"
13+
RUST_TOOLCHAIN: "1.93.0"
1414

1515
jobs:
1616
python-black:

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name = "pathway"
33
version = "0.29.0"
44
edition = "2021"
55
publish = false
6-
rust-version = "1.92"
6+
rust-version = "1.93"
77
license = "BUSL-1.1"
88

99
[lib]

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "1.92"
2+
channel = "1.93"

src/engine/dataflow/operators/prev_next.rs

Lines changed: 35 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -501,13 +501,13 @@ where
501501
carry = (P, (PP,N)), push (P', (_PP', K'))
502502
*/
503503
if !carry_entry.is_empty() {
504-
if carry_entry.key.is_some() {
505-
move_to_key_or_upper_bound(input_wrapper, carry_entry.key.as_ref().unwrap());
504+
if let Some(ref carry_entry_key) = carry_entry.key {
505+
move_to_key_or_upper_bound(input_wrapper, carry_entry_key);
506506
let weight = key_val_weight_up_to_time(input_wrapper, time);
507507
log::debug!("pushing carry entry {carry_entry:?}",);
508508
push_insert_replace(
509509
output_wrapper,
510-
&carry_entry.key.clone().unwrap(),
510+
&carry_entry_key.clone(),
511511
&(carry_entry.prev, carry_entry.next.clone()),
512512
&carry_entry.time.unwrap(),
513513
&weight.unwrap(),
@@ -615,28 +615,34 @@ where
615615
*/
616616

617617
//normalize carry_entry, to get rid of some cases to consider
618-
619-
if carry_entry.key.is_some() && !carry_entry.key.eq(&prev) {
620-
move_to_key_or_upper_bound(input_wrapper, carry_entry.key.as_ref().unwrap());
621-
let weight = key_val_weight_up_to_time(input_wrapper, time);
622-
push_insert_replace(
623-
output_wrapper,
624-
carry_entry.key.as_ref().unwrap(),
625-
&(carry_entry.prev, carry_entry.next.clone()),
626-
carry_entry.time.as_ref().unwrap(),
627-
&weight.unwrap(),
628-
batch_builder,
629-
);
618+
match carry_entry.key {
619+
Some(ref carry_entry_key) if !carry_entry.key.eq(&prev) => {
620+
move_to_key_or_upper_bound(input_wrapper, carry_entry_key);
621+
let weight = key_val_weight_up_to_time(input_wrapper, time);
622+
push_insert_replace(
623+
output_wrapper,
624+
carry_entry_key,
625+
&(carry_entry.prev, carry_entry.next.clone()),
626+
carry_entry.time.as_ref().unwrap(),
627+
&weight.unwrap(),
628+
batch_builder,
629+
);
630+
}
631+
_ => {}
630632
}
633+
631634
//if next of carried entry is less than prev, we need fix prev of key from carry-entry-next
632-
if carry_entry.next.is_some() && carry_entry.next.lt(&prev) {
633-
push_prev_replace(
634-
output_wrapper,
635-
&carry_entry.next.unwrap(),
636-
carry_entry.key.as_ref(),
637-
&carry_entry.time.unwrap(),
638-
batch_builder,
639-
);
635+
match carry_entry.next {
636+
Some(ref carry_entry_next) if carry_entry.next.lt(&prev) => {
637+
push_prev_replace(
638+
output_wrapper,
639+
carry_entry_next,
640+
carry_entry.key.as_ref(),
641+
&carry_entry.time.unwrap(),
642+
batch_builder,
643+
);
644+
}
645+
_ => {}
640646
}
641647

642648
move_to_key_or_upper_bound(input_wrapper, prev_value);
@@ -739,26 +745,25 @@ fn handle_one_instance<
739745
}
740746
log::debug!("final carry {carry_entry:?}");
741747
if !carry_entry.is_empty() {
742-
if carry_entry.key.is_some() {
743-
move_to_key_or_upper_bound(input_wrapper, carry_entry.key.as_ref().unwrap());
748+
if let Some(ref carry_entry_key) = carry_entry.key {
749+
move_to_key_or_upper_bound(input_wrapper, carry_entry_key);
744750
let weight = key_val_weight_up_to_time(input_wrapper, time);
745751
push_insert_replace(
746752
output_wrapper,
747-
carry_entry.key.as_ref().unwrap(),
753+
carry_entry_key,
748754
&(carry_entry.prev, carry_entry.next.clone()),
749755
carry_entry.time.as_ref().unwrap(),
750756
&weight.unwrap(),
751757
batch_builder,
752758
);
753759
}
754760

755-
if carry_entry.next.is_some() {
756-
let key_to_fix = carry_entry.next.unwrap();
757-
move_to_key_or_upper_bound(output_wrapper, &key_to_fix);
761+
if let Some(carry_entry_next) = carry_entry.next {
762+
move_to_key_or_upper_bound(output_wrapper, &carry_entry_next);
758763
rewind_zero_weight_val_forward(output_wrapper, time);
759764
push_prev_replace(
760765
output_wrapper,
761-
&key_to_fix,
766+
&carry_entry_next,
762767
carry_entry.key.as_ref(),
763768
carry_entry.time.as_ref().unwrap(),
764769
batch_builder,

0 commit comments

Comments
 (0)