diff --git a/src/database/database.rs b/src/database/database.rs index 119217c..273ecdd 100644 --- a/src/database/database.rs +++ b/src/database/database.rs @@ -15,11 +15,10 @@ impl Database { let namespace_cf = ColumnFamilyDescriptor::new("NamespaceData", Options::default()); let table_cf = ColumnFamilyDescriptor::new("TableData", Options::default()); - let operator_cf = ColumnFamilyDescriptor::new("OperatorStatistics", Options::default()); let table_namespace_cf = ColumnFamilyDescriptor::new("TableNamespaceMap", Options::default()); - let cfs_vec = vec![namespace_cf, table_cf, operator_cf, table_namespace_cf]; + let cfs_vec = vec![namespace_cf, table_cf, table_namespace_cf]; let db = DB::open_cf_descriptors(&opts, path, cfs_vec) .map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e.to_string()))?; diff --git a/src/dto/operator_statistics.rs b/src/dto/operator_statistics.rs deleted file mode 100644 index cb7b7d9..0000000 --- a/src/dto/operator_statistics.rs +++ /dev/null @@ -1,33 +0,0 @@ -use serde::{Deserialize, Serialize}; - -#[derive(Debug, Serialize, Deserialize)] -pub struct OperatorStatistics { - pub operator_string: String, - pub cardinality_prev_result: u64, -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_operator_statistics_serialization() { - let operator_statistics = OperatorStatistics { - operator_string: "test_operator".to_string(), - cardinality_prev_result: 100, - }; - - let serialized = serde_json::to_string(&operator_statistics).unwrap(); - let expected = r#"{"operator_string":"test_operator","cardinality_prev_result":100}"#; - assert_eq!(serialized, expected); - } - - #[test] - fn test_operator_statistics_deserialization() { - let data = r#"{"operator_string":"test_operator","cardinality_prev_result":100}"#; - let operator_statistics: OperatorStatistics = serde_json::from_str(data).unwrap(); - - assert_eq!(operator_statistics.operator_string, "test_operator"); - assert_eq!(operator_statistics.cardinality_prev_result, 100); - } -}