Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use std::collections::HashMap;
use crate::dataset::{ColumnType, Dataset, Value, Row};
use crate::dataset::{ColumnType, Dataset, Value, Row}; //
use crate::query::{Aggregation, Condition, Query};


Expand Down Expand Up @@ -58,8 +58,9 @@ pub fn group_by_dataset(dataset: Dataset, group_by_column: &String) -> HashMap<V
.add_row(row.clone()); // copy of the row ref-ed above is added to the subset/dataset
}
grouped_datasets
}

}pub fn aggregate_dataset(dataset: HashMap<Value, Dataset>,aggregation: &Aggregation) -> HashMap<Value, Value> {
pub fn aggregate_dataset(dataset: HashMap<Value, Dataset>,aggregation: &Aggregation) -> HashMap<Value, Value> {
let mut results = HashMap::new();
for (group_key, group_dataset) in dataset {

Expand Down