mirror of
https://github.com/GreptimeTeam/greptimedb.git
synced 2026-05-30 20:00:36 +00:00
chore: upgrade toolchain to nightly-2024-08-07 (#4549)
* chore: upgrade toolchain to `nightly-2024-08-07` * chore(ci): upgrade toolchain * fix: fix unit test
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use std::any::Any;
|
||||
use std::collections::HashMap;
|
||||
use std::sync::Arc;
|
||||
|
||||
@@ -31,8 +32,9 @@ use tokio::runtime::Runtime;
|
||||
static SCRIPT_ENGINE: Lazy<PyEngine> = Lazy::new(sample_script_engine);
|
||||
static LOCAL_RUNTIME: OnceCell<tokio::runtime::Runtime> = OnceCell::new();
|
||||
fn get_local_runtime() -> std::thread::Result<&'static Runtime> {
|
||||
let rt = LOCAL_RUNTIME
|
||||
.get_or_try_init(|| tokio::runtime::Runtime::new().map_err(|e| Box::new(e) as _))?;
|
||||
let rt = LOCAL_RUNTIME.get_or_try_init(|| {
|
||||
tokio::runtime::Runtime::new().map_err(|e| Box::new(e) as Box<dyn Any + Send + 'static>)
|
||||
})?;
|
||||
Ok(rt)
|
||||
}
|
||||
/// a terrible hack to call async from sync by:
|
||||
|
||||
@@ -175,7 +175,7 @@ coprocessor = copr
|
||||
/// constants will be broadcast to length of `col_len`
|
||||
/// accept and convert if obj is of two types:
|
||||
/// 1. tuples of PyVector/PyList of literals/single literal of same type
|
||||
/// or a mixed tuple of PyVector and PyList of same type Literals
|
||||
/// or a mixed tuple of PyVector and PyList of same type Literals
|
||||
/// 2. a single PyVector
|
||||
/// 3. a PyList of same type Literals
|
||||
/// 4. a single constant, will be expanded to a PyVector of length of `col_len`
|
||||
|
||||
Reference in New Issue
Block a user