fix(query/clickhouse_http_handler) write finish to query log table.
@@ -66,7 +66,6 @@ async fn execute(
input_stream: Option<SendableDataBlockStream>,
) -> Result<Body> {
let interpreter = InterpreterFactory::get(ctx.clone(), plan.clone())?;
- // Write Start to query log table.
let _ = interpreter
.start()
.await
@@ -84,6 +83,11 @@ async fn execute(
Err(err) => yield(Err(err)),
};
}
+
+ let _ = interpreter
+ .finish()
+ .await
+ .map_err(|e| tracing::error!("interpreter.finish error: {:?}", e));
};
Ok(Body::from_bytes_stream(stream))
