refactor: move encodings to scalar module

pull/24376/head
Edd Robinson 2021-05-11 22:39:38 +01:00
parent 482e4dab86
commit aa83669740
9 changed files with 13 additions and 8 deletions

View File

@ -42,7 +42,7 @@ name = "sum_fixed"
harness = false
[[bench]]
name = "dictionary"
name = "string"
harness = false
[[bench]]

View File

@ -15,7 +15,7 @@ use arrow::array::Array;
use crate::schema::LogicalDataType;
use crate::value::{EncodedValues, OwnedValue, Scalar, Value, Values};
use boolean::BooleanEncoding;
use encoding::{bool, fixed_null, string::NULL_ID};
use encoding::{bool, scalar};
use float::FloatEncoding;
use integer::IntegerEncoding;
use string::StringEncoding;
@ -1068,7 +1068,7 @@ impl From<arrow::array::Float64Array> for Column {
_ => unreachable!("min/max must both be Some or None"),
};
let data = fixed_null::FixedNull::<arrow::datatypes::Float64Type>::from(arr);
let data = scalar::FixedNull::<arrow::datatypes::Float64Type>::from(arr);
let meta = MetaData {
range,
..MetaData::default()
@ -1334,6 +1334,7 @@ pub(crate) struct Statistics {
mod test {
use super::*;
use arrow::array::{Int64Array, StringArray};
use encoding::string::NULL_ID;
#[test]
fn row_ids_intersect() {

View File

@ -1,4 +1,3 @@
pub mod bool;
pub mod fixed;
pub mod fixed_null;
pub mod scalar;
pub mod string;

View File

@ -0,0 +1,5 @@
pub mod fixed;
pub mod fixed_null;
pub use fixed::Fixed;
pub use fixed_null::FixedNull;

View File

@ -1,6 +1,6 @@
use arrow::{self, array::Array};
use super::encoding::{fixed::Fixed, fixed_null::FixedNull};
use super::encoding::{scalar::Fixed, scalar::FixedNull};
use super::{cmp, Statistics};
use crate::column::{RowIDs, Scalar, Value, Values};

View File

@ -1,6 +1,6 @@
use arrow::{self, array::Array};
use super::encoding::{fixed::Fixed, fixed_null::FixedNull};
use super::encoding::{scalar::Fixed, scalar::FixedNull};
use super::{cmp, Statistics};
use crate::column::{EncodedValues, RowIDs, Scalar, Value, Values};

View File

@ -22,7 +22,7 @@ pub use table::ReadFilterResults;
/// It should not be imported into any non-testing or benchmarking crates.
pub mod benchmarks {
pub use crate::column::{
cmp::Operator, encoding::fixed::Fixed, encoding::fixed_null::FixedNull, encoding::string,
cmp::Operator, encoding::scalar::Fixed, encoding::scalar::FixedNull, encoding::string,
Column, RowIDs,
};