Skip to content

Commit

Permalink
just passed a quick manual e2e test
Browse files Browse the repository at this point in the history
Signed-off-by: Richard Chien <stdrc@outlook.com>

add comment

Signed-off-by: Richard Chien <stdrc@outlook.com>

order type little things

Signed-off-by: Richard Chien <stdrc@outlook.com>

`fnd_affected_ranges` seems to work now

Signed-off-by: Richard Chien <stdrc@outlook.com>

typo

Signed-off-by: Richard Chien <stdrc@outlook.com>

typo

Signed-off-by: Richard Chien <stdrc@outlook.com>

typo

Signed-off-by: Richard Chien <stdrc@outlook.com>

simplify frame start/end calculation

Signed-off-by: Richard Chien <stdrc@outlook.com>

minor

Signed-off-by: Richard Chien <stdrc@outlook.com>

check range frame bounds

Signed-off-by: Richard Chien <stdrc@outlook.com>

add comment

Signed-off-by: Richard Chien <stdrc@outlook.com>

display RangeFrameBounds

Signed-off-by: Richard Chien <stdrc@outlook.com>
  • Loading branch information
stdrc committed Jan 9, 2024
1 parent 513a2a6 commit ec57ab0
Show file tree
Hide file tree
Showing 9 changed files with 1,372 additions and 65 deletions.
14 changes: 9 additions & 5 deletions src/common/src/util/sort_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ use crate::types::{DefaultOrdered, ToDatumRef};

/// Sort direction, ascending/descending.
#[derive(PartialEq, Eq, Hash, Copy, Clone, Debug, Display, Default)]
enum Direction {
pub enum Direction {
#[default]
#[display("ASC")]
Ascending,
Expand All @@ -38,15 +38,15 @@ enum Direction {
}

impl Direction {
pub fn from_protobuf(direction: &PbDirection) -> Self {
fn from_protobuf(direction: &PbDirection) -> Self {
match direction {
PbDirection::Ascending => Self::Ascending,
PbDirection::Descending => Self::Descending,
PbDirection::Unspecified => unreachable!(),
}
}

pub fn to_protobuf(self) -> PbDirection {
fn to_protobuf(self) -> PbDirection {
match self {
Self::Ascending => PbDirection::Ascending,
Self::Descending => PbDirection::Descending,
Expand Down Expand Up @@ -74,15 +74,15 @@ enum NullsAre {
}

impl NullsAre {
pub fn from_protobuf(nulls_are: &PbNullsAre) -> Self {
fn from_protobuf(nulls_are: &PbNullsAre) -> Self {
match nulls_are {
PbNullsAre::Largest => Self::Largest,
PbNullsAre::Smallest => Self::Smallest,
PbNullsAre::Unspecified => unreachable!(),
}
}

pub fn to_protobuf(self) -> PbNullsAre {
fn to_protobuf(self) -> PbNullsAre {
match self {
Self::Largest => PbNullsAre::Largest,
Self::Smallest => PbNullsAre::Smallest,
Expand Down Expand Up @@ -185,6 +185,10 @@ impl OrderType {
Self::nulls_last(Direction::Descending)
}

pub fn direction(&self) -> Direction {
self.direction
}

pub fn is_ascending(&self) -> bool {
self.direction == Direction::Ascending
}
Expand Down
Loading

0 comments on commit ec57ab0

Please sign in to comment.