From 6ab8990bbdb1545ea477615b91a884a536fe0fb9 Mon Sep 17 00:00:00 2001 From: Paul Masurel Date: Fri, 20 Jan 2023 13:50:20 +0900 Subject: [PATCH] Make it possible to force a column type and intricate bugfix. --- columnar/Cargo.toml | 4 ---- columnar/Makefile | 6 ++++++ columnar/src/TODO.md | 1 + columnar/src/columnar/column_type.rs | 2 +- columnar/src/value.rs | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 columnar/Makefile diff --git a/columnar/Cargo.toml b/columnar/Cargo.toml index fedb252f6..527c45dcf 100644 --- a/columnar/Cargo.toml +++ b/columnar/Cargo.toml @@ -24,9 +24,5 @@ proptest = "1" more-asserts = "0.3.0" rand = "0.8.3" -# temporary -[workspace] -members = [] - [features] unstable = [] diff --git a/columnar/Makefile b/columnar/Makefile new file mode 100644 index 000000000..764d93849 --- /dev/null +++ b/columnar/Makefile @@ -0,0 +1,6 @@ +test: + echo "Run test only... No examples." + cargo test --tests --lib + +fmt: + cargo +nightly fmt --all diff --git a/columnar/src/TODO.md b/columnar/src/TODO.md index c29f86910..24cb0e76f 100644 --- a/columnar/src/TODO.md +++ b/columnar/src/TODO.md @@ -26,6 +26,7 @@ Add alignment? Consider another codec to bridge the gap between few and 5k elements # Cleanup and rationalization +remove the 6 bit limitation of columntype. use 4 + 4 bits instead. in benchmark, unify percent vs ratio, f32 vs f64. investigate if should have better errors? io::Error is overused at the moment. rename rank/select in unit tests diff --git a/columnar/src/columnar/column_type.rs b/columnar/src/columnar/column_type.rs index a723cb015..073c79bbf 100644 --- a/columnar/src/columnar/column_type.rs +++ b/columnar/src/columnar/column_type.rs @@ -1,7 +1,7 @@ use std::net::Ipv6Addr; use crate::value::NumericalType; -use crate::InvalidData; +use crate::{column, Column, DynamicColumn, InvalidData, StrColumn}; /// The column type represents the column type and can fit on 6-bits. /// diff --git a/columnar/src/value.rs b/columnar/src/value.rs index be5edb100..b893974de 100644 --- a/columnar/src/value.rs +++ b/columnar/src/value.rs @@ -1,4 +1,4 @@ -use crate::InvalidData; +use crate::{Column, ColumnType, InvalidData}; #[derive(Copy, Clone, PartialEq, Debug)] pub enum NumericalValue {