mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-19 22:40:40 +00:00
refactor: execute insert with select in query engine (#1181)
* refactor: execute insert with select in query engine * fix: resolve PR comments
This commit is contained in:
@@ -282,7 +282,7 @@ impl Script for PyScript {
|
||||
.planner()
|
||||
.plan(stmt, QueryContext::arc())
|
||||
.await?;
|
||||
let res = self.query_engine.execute(&plan).await?;
|
||||
let res = self.query_engine.execute(plan, QueryContext::arc()).await?;
|
||||
let copr = self.copr.clone();
|
||||
match res {
|
||||
Output::Stream(stream) => Ok(Output::Stream(Box::pin(CoprStream::try_new(
|
||||
|
||||
@@ -35,6 +35,7 @@ use rustpython_compiler_core::CodeObject;
|
||||
use rustpython_vm as vm;
|
||||
#[cfg(test)]
|
||||
use serde::Deserialize;
|
||||
use session::context::QueryContext;
|
||||
use snafu::{OptionExt, ResultExt};
|
||||
use vm::builtins::{PyList, PyListRef};
|
||||
use vm::convert::ToPyObject;
|
||||
@@ -373,7 +374,7 @@ impl PyQueryEngine {
|
||||
.map_err(|e| e.to_string())?;
|
||||
let res = engine
|
||||
.clone()
|
||||
.execute(&plan)
|
||||
.execute(plan, QueryContext::arc())
|
||||
.await
|
||||
.map_err(|e| e.to_string());
|
||||
match res {
|
||||
|
||||
@@ -167,7 +167,7 @@ impl ScriptsTable {
|
||||
|
||||
let stream = match self
|
||||
.query_engine
|
||||
.execute(&plan)
|
||||
.execute(plan, QueryContext::arc())
|
||||
.await
|
||||
.context(FindScriptSnafu { name })?
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user