-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cubestore): switch from string to float in table value (#2175)
This significantly improves performance of import and other operations.
- Loading branch information
1 parent
e162662
commit 05dc7d2
Showing
8 changed files
with
59 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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 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 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 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 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 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 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 |
---|---|---|
@@ -1,4 +1,5 @@ | ||
pub mod maybe_owned; | ||
pub mod ordfloat; | ||
|
||
use crate::CubeError; | ||
use log::error; | ||
|
This file contains 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,39 @@ | ||
use serde::{Deserialize, Serialize}; | ||
use smallvec::alloc::fmt::Formatter; | ||
use std::cmp::Ordering; | ||
use std::fmt; | ||
|
||
#[derive(Clone, Copy, Debug, Serialize, Deserialize)] | ||
#[repr(transparent)] | ||
pub struct OrdF64(pub f64); | ||
|
||
impl PartialEq for OrdF64 { | ||
fn eq(&self, other: &Self) -> bool { | ||
return self.cmp(other) == Ordering::Equal; | ||
} | ||
} | ||
impl Eq for OrdF64 {} | ||
|
||
impl PartialOrd for OrdF64 { | ||
fn partial_cmp(&self, other: &Self) -> Option<Ordering> { | ||
return Some(self.cmp(other)); | ||
} | ||
} | ||
|
||
impl Ord for OrdF64 { | ||
fn cmp(&self, other: &Self) -> Ordering { | ||
return self.0.total_cmp(&other.0); | ||
} | ||
} | ||
|
||
impl fmt::Display for OrdF64 { | ||
fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), fmt::Error> { | ||
self.0.fmt(f) | ||
} | ||
} | ||
|
||
impl From<f64> for OrdF64 { | ||
fn from(v: f64) -> Self { | ||
return Self(v); | ||
} | ||
} |