refactor: read_filter debugging
parent
42d5076772
commit
96fb595cc0
|
@ -11,6 +11,7 @@ pub mod stringset;
|
|||
mod task;
|
||||
pub use context::{DEFAULT_CATALOG, DEFAULT_SCHEMA};
|
||||
use futures::{future, Future};
|
||||
use observability_deps::tracing::debug;
|
||||
|
||||
use std::sync::Arc;
|
||||
|
||||
|
@ -190,6 +191,40 @@ impl Executor {
|
|||
results.extend(handle?.into_iter());
|
||||
}
|
||||
|
||||
// TEMP(edd): attempting to get more insight into series frame
|
||||
// construction.
|
||||
//
|
||||
// Consider removing as very noisy
|
||||
//
|
||||
for (i, result) in results.iter().enumerate() {
|
||||
if let SeriesSetItem::Data(item) = result {
|
||||
if i == 0 {
|
||||
// emit batch used across the series set.
|
||||
//
|
||||
// TEMP(edd): clones record batch.
|
||||
//
|
||||
if let Ok(rb) =
|
||||
arrow::util::pretty::pretty_format_batches(&[item.batch.clone()])
|
||||
{
|
||||
debug!("record batch {}", rb);
|
||||
}
|
||||
}
|
||||
|
||||
let tags = item
|
||||
.tags
|
||||
.iter()
|
||||
.map(|(k, v)| format!(" ({}, {})", k, v))
|
||||
.collect::<Vec<_>>();
|
||||
debug!(
|
||||
table_name = item.table_name.as_ref(),
|
||||
?tags,
|
||||
start_row = item.start_row,
|
||||
num_rows = item.num_rows,
|
||||
"series set item"
|
||||
);
|
||||
}
|
||||
}
|
||||
//
|
||||
Ok(results)
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ use generated_types::{
|
|||
TimestampRange,
|
||||
};
|
||||
use metrics::KeyValue;
|
||||
use observability_deps::tracing::{error, info};
|
||||
use observability_deps::tracing::{debug, error, info};
|
||||
use query::{
|
||||
exec::fieldlist::FieldList, exec::seriesset::Error as SeriesSetError,
|
||||
predicate::PredicateBuilder, DatabaseStore,
|
||||
|
@ -251,6 +251,7 @@ where
|
|||
.map(Ok)
|
||||
.collect::<Vec<_>>();
|
||||
|
||||
debug!(?results, "read_filter response");
|
||||
ob.ok_with_labels(labels);
|
||||
Ok(tonic::Response::new(futures::stream::iter(results)))
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue