feat: add tracing to field_columns
parent
787a848bf5
commit
32baaa1ee7
|
@ -121,7 +121,8 @@ impl Planner {
|
||||||
where
|
where
|
||||||
D: QueryDatabase + 'static,
|
D: QueryDatabase + 'static,
|
||||||
{
|
{
|
||||||
let planner = InfluxRpcPlanner::default();
|
let planner =
|
||||||
|
InfluxRpcPlanner::new().with_execution_context(self.ctx.child_ctx("influxrpc_planner"));
|
||||||
|
|
||||||
self.ctx
|
self.ctx
|
||||||
.run(async move {
|
.run(async move {
|
||||||
|
|
|
@ -660,6 +660,7 @@ impl InfluxRpcPlanner {
|
||||||
where
|
where
|
||||||
D: QueryDatabase + 'static,
|
D: QueryDatabase + 'static,
|
||||||
{
|
{
|
||||||
|
let ctx = self.ctx.child_ctx("field_columns planning");
|
||||||
debug!(?rpc_predicate, "planning field_columns");
|
debug!(?rpc_predicate, "planning field_columns");
|
||||||
|
|
||||||
// Special case predicates that span the entire valid timestamp range
|
// Special case predicates that span the entire valid timestamp range
|
||||||
|
@ -688,7 +689,13 @@ impl InfluxRpcPlanner {
|
||||||
.table_schema(table_name)
|
.table_schema(table_name)
|
||||||
.context(TableRemovedSnafu { table_name })?;
|
.context(TableRemovedSnafu { table_name })?;
|
||||||
|
|
||||||
if let Some(plan) = self.field_columns_plan(table_name, schema, predicate, chunks)? {
|
if let Some(plan) = self.field_columns_plan(
|
||||||
|
ctx.child_ctx("field_columns plan"),
|
||||||
|
table_name,
|
||||||
|
schema,
|
||||||
|
predicate,
|
||||||
|
chunks,
|
||||||
|
)? {
|
||||||
field_list_plan = field_list_plan.append(plan);
|
field_list_plan = field_list_plan.append(plan);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -963,6 +970,7 @@ impl InfluxRpcPlanner {
|
||||||
/// ```
|
/// ```
|
||||||
fn field_columns_plan<C>(
|
fn field_columns_plan<C>(
|
||||||
&self,
|
&self,
|
||||||
|
ctx: IOxExecutionContext,
|
||||||
table_name: &str,
|
table_name: &str,
|
||||||
schema: Arc<Schema>,
|
schema: Arc<Schema>,
|
||||||
predicate: &Predicate,
|
predicate: &Predicate,
|
||||||
|
@ -972,7 +980,7 @@ impl InfluxRpcPlanner {
|
||||||
C: QueryChunk + 'static,
|
C: QueryChunk + 'static,
|
||||||
{
|
{
|
||||||
let scan_and_filter = self.scan_and_filter(
|
let scan_and_filter = self.scan_and_filter(
|
||||||
self.ctx.child_ctx("scan_and_filter planning"),
|
ctx.child_ctx("scan_and_filter planning"),
|
||||||
table_name,
|
table_name,
|
||||||
schema,
|
schema,
|
||||||
predicate,
|
predicate,
|
||||||
|
|
Loading…
Reference in New Issue