From 8b406b4f916252e40446d9cfea18cec2c7c06201 Mon Sep 17 00:00:00 2001 From: Edd Robinson Date: Fri, 22 Oct 2021 12:06:56 +0100 Subject: [PATCH] test: update table_summaries test --- read_buffer/src/chunk.rs | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/read_buffer/src/chunk.rs b/read_buffer/src/chunk.rs index 94ac209ba4..82b4ae587f 100644 --- a/read_buffer/src/chunk.rs +++ b/read_buffer/src/chunk.rs @@ -873,7 +873,7 @@ mod test { .collect::>(), ), Arc::new( - (vec![None, None, None] as Vec>) + (vec![Some("host a"), None, Some("host b")] as Vec>) .into_iter() .collect::>(), ), @@ -881,7 +881,11 @@ mod test { Arc::new(UInt64Array::from(vec![1000, 3000, 5000])), Arc::new(Int64Array::from(vec![1000, -1000, 4000])), Arc::new(BooleanArray::from(vec![true, true, false])), - Arc::new(StringArray::from(vec![Some("msg a"), Some("msg b"), None])), + Arc::new(StringArray::from(vec![ + Some("msg a"), + Some("msg b"), + Some("msg b"), + ])), Arc::new(TimestampNanosecondArray::from_vec( vec![11111111, 222222, 3333], None, @@ -925,7 +929,13 @@ mod test { ColumnSummary { name: "host".into(), influxdb_type: Some(InfluxDbType::Tag), - stats: Statistics::String(StatValues::new_all_null(3)), + stats: Statistics::String(StatValues { + min: Some("host a".into()), + max: Some("host b".into()), + total_count: 3, + null_count: 1, + distinct_count: Some(NonZeroU64::new(3).unwrap()), + }), }, ColumnSummary { name: "icounter".into(), @@ -939,8 +949,8 @@ mod test { min: Some("msg a".into()), max: Some("msg b".into()), total_count: 3, - null_count: 1, - distinct_count: Some(NonZeroU64::new(3).unwrap()), + null_count: 0, + distinct_count: Some(NonZeroU64::new(2).unwrap()), }), }, ColumnSummary {