Skip to content

panic when use string on interval column #5338

@yihong0618

Description

@yihong0618

What type of bug is this?

Crash

What subsystems are affected?

Standalone mode

Minimal reproduce step

When I try to fix #3235
steps

create table test2(val interval, ts timestamp time index);

insert into test2 values('1 year', 1000);

will cause panic

log

 panic.file="src/sql/src/statements.rs" panic.line=140 panic.column=13
2025-01-10T07:56:21.623518Z ERROR common_telemetry::panic_hook: panicked at src/sql/src/statements.rs:140:13:
internal error: entered unreachable code backtrace=   0: backtrace::backtrace::libunwind::trace
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/backtrace/libunwind.rs:116:5
      backtrace::backtrace::trace_unsynchronized
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/backtrace/mod.rs:66:5
   1: backtrace::backtrace::trace
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/backtrace/mod.rs:53:14
   2: backtrace::capture::Backtrace::create
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/capture.rs:292:9
   3: backtrace::capture::Backtrace::new
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/capture.rs:257:22
   4: common_telemetry::panic_hook::set_panic_hook::{{closure}}
             at /Users/hyi/prs/greptimedb/src/common/telemetry/src/panic_hook.rs:37:25
   5: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/alloc/src/boxed.rs:2468:9
      std::panicking::rust_panic_with_hook
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/std/src/panicking.rs:809:13
   6: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/std/src/panicking.rs:667:13
   7: std::sys::backtrace::__rust_end_short_backtrace
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/std/src/sys/backtrace.rs:170:18
   8: rust_begin_unwind
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/std/src/panicking.rs:665:5
   9: core::panicking::panic_fmt
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/core/src/panicking.rs:74:14
  10: core::panicking::panic
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/core/src/panicking.rs:148:5
  11: sql::statements::parse_string_to_value
             at /Users/hyi/prs/greptimedb/src/sql/src/statements.rs:140:13
  12: sql::statements::sql_value_to_value
             at /Users/hyi/prs/greptimedb/src/sql/src/statements.rs:263:13
  13: operator::req_convert::insert::stmt_to_region::sql_value_to_grpc_value
             at /Users/hyi/prs/greptimedb/src/operator/src/req_convert/insert/stmt_to_region.rs:217:9
  14: operator::req_convert::insert::stmt_to_region::StatementToRegion::convert::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/req_convert/insert/stmt_to_region.rs:126:29
  15: operator::insert::Inserter::handle_statement_insert::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/insert.rs:285:18
  16: operator::statement::dml::<impl operator::statement::StatementExecutor>::insert::{{closure}}::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/statement/dml.rs:32:18
  17: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  18: operator::statement::dml::<impl operator::statement::StatementExecutor>::insert::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/statement/dml.rs:26:5
  19: operator::statement::StatementExecutor::execute_sql::{{closure}}::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/statement.rs:151:73
  20: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  21: operator::statement::StatementExecutor::execute_sql::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/statement.rs:134:5
  22: frontend::instance::Instance::query_statement::{{closure}}
             at /Users/hyi/prs/greptimedb/src/frontend/src/instance.rs:267:70
  23: <frontend::instance::Instance as servers::query_handler::sql::SqlQueryHandler>::do_query::{{closure}}::{{closure}}
             at /Users/hyi/prs/greptimedb/src/frontend/src/instance.rs:307:81
  24: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  25: <frontend::instance::Instance as servers::query_handler::sql::SqlQueryHandler>::do_query::{{closure}}
             at /Users/hyi/prs/greptimedb/src/frontend/src/instance.rs:278:5
  26: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  27: <servers::query_handler::sql::ServerSqlQueryHandlerAdapter<E> as servers::query_handler::sql::SqlQueryHandler>::do_query::{{closure}}
             at /Users/hyi/prs/greptimedb/src/servers/src/query_handler/sql.rs:85:14
  28: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  29: servers::postgres::handler::<impl pgwire::api::query::SimpleQueryHandler for servers::postgres::PostgresServerHandlerInner>::do_query::{{closure}}::{{closure}}
             at /Users/hyi/prs/greptimedb/src/servers/src/postgres/handler.rs:80:81
  30: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  31: servers::postgres::handler::<impl pgwire::api::query::SimpleQueryHandler for servers::postgres::PostgresServerHandlerInner>::do_query::{{closure}}
             at /Users/hyi/prs/greptimedb/src/servers/src/postgres/handler.rs:51:5
  32: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  33: pgwire::api::query::SimpleQueryHandler::on_query::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pgwire-0.28.0/src/api/query.rs:65:61
  34: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  35: pgwire::tokio::server::process_message::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pgwire-0.28.0/src/tokio/server.rs:206:59
  36: pgwire::tokio::server::do_process_socket::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pgwire-0.28.0/src/tokio/server.rs:351:10
  37: pgwire::tokio::server::process_socket::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pgwire-0.28.0/src/tokio/server.rs:419:10
  38: servers::postgres::server::PostgresServer::accept::{{closure}}::{{closure}}::{{closure}}
             at /Users/hyi/prs/greptimedb/src/servers/src/postgres/server.rs:99:93
  39: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  40: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/core.rs:331:17
  41: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/core.rs:320:13
  42: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:499:19
  43: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
  44: std::panicking::try::do_call
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40
  45: ___rust_try
  46: std::panicking::try
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19
      std::panic::catch_unwind
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14
  47: tokio::runtime::task::harness::poll_future
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:487:18
  48: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:209:27
  49: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:154:15
  50: tokio::runtime::task::raw::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/raw.rs:271:5
  51: tokio::runtime::task::raw::RawTask::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/raw.rs:201:18
  52: tokio::runtime::task::LocalNotified<S>::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/mod.rs:435:9
  53: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:596:13
  54: tokio::runtime::coop::with_budget
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/coop.rs:107:5
      tokio::runtime::coop::budget
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/coop.rs:73:5
      tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:595:9
  55: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:546:24
  56: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:511:21
  57: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/context/scoped.rs:40:9
  58: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/context.rs:180:26
  59: std::thread::local::LocalKey<T>::try_with
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12
  60: std::thread::local::LocalKey<T>::with
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9
  61: tokio::runtime::context::set_scheduler
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/context.rs:180:9
  62: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:506:9
  63: tokio::runtime::context::runtime::enter_runtime
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/context/runtime.rs:65:16
  64: tokio::runtime::scheduler::multi_thread::worker::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:498:5
  65: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:464:45
  66: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/blocking/task.rs:42:21
  67: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/core.rs:331:17
  68: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/core.rs:320:13
  69: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:499:19
  70: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
  71: std::panicking::try::do_call
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40
  72: ___rust_try
  73: std::panicking::try
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19
      std::panic::catch_unwind
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14
  74: tokio::runtime::task::harness::poll_future
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:487:18
  75: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:209:27
  76: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:154:15
  77: tokio::runtime::task::raw::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/raw.rs:271:5
  78: tokio::runtime::task::raw::RawTask::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/raw.rs:201:18
  79: tokio::runtime::task::UnownedTask<S>::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/mod.rs:472:9
  80: tokio::runtime::blocking::pool::Task::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/blocking/pool.rs:161:9
  81: tokio::runtime::blocking::pool::Inner::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/blocking/pool.rs:511:17
  82: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/blocking/pool.rs:469:13
  83: std::sys::backtrace::__rust_begin_short_backtrace
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:154:18
  84: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:538:17
  85: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
  86: std::panicking::try::do_call
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40
  87: ___rust_try
  88: std::panicking::try
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19
      std::panic::catch_unwind
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14
      std::thread::Builder::spawn_unchecked_::{{closure}}
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:537:30
  89: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  90: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/alloc/src/boxed.rs:2454:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/alloc/src/boxed.rs:2454:9
      std::sys::pal::unix::thread::Thread::new::thread_start
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/std/src/sys/pal/unix/thread.rs:105:17
  91: __pthread_deallocate
 panic.file="src/sql/src/statements.rs" panic.line=140 panic.column=13

What did you expect to see?

type error

What did you see instead?

91: __pthread_deallocate
panic.file="src/sql/src/statements.rs" panic.line=140 panic.column=13

What operating system did you use?

Mac OS X 10.5 ARM

What version of GreptimeDB did you use?

0.11.2

Relevant log output and stack trace

panic.file="src/sql/src/statements.rs" panic.line=140 panic.column=13
2025-01-10T07:56:21.623518Z ERROR common_telemetry::panic_hook: panicked at src/sql/src/statements.rs:140:13:
internal error: entered unreachable code backtrace=   0: backtrace::backtrace::libunwind::trace
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/backtrace/libunwind.rs:116:5
      backtrace::backtrace::trace_unsynchronized
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/backtrace/mod.rs:66:5
   1: backtrace::backtrace::trace
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/backtrace/mod.rs:53:14
   2: backtrace::capture::Backtrace::create
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/capture.rs:292:9
   3: backtrace::capture::Backtrace::new
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/backtrace-0.3.74/src/capture.rs:257:22
   4: common_telemetry::panic_hook::set_panic_hook::{{closure}}
             at /Users/hyi/prs/greptimedb/src/common/telemetry/src/panic_hook.rs:37:25
   5: <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/alloc/src/boxed.rs:2468:9
      std::panicking::rust_panic_with_hook
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/std/src/panicking.rs:809:13
   6: std::panicking::begin_panic_handler::{{closure}}
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/std/src/panicking.rs:667:13
   7: std::sys::backtrace::__rust_end_short_backtrace
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/std/src/sys/backtrace.rs:170:18
   8: rust_begin_unwind
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/std/src/panicking.rs:665:5
   9: core::panicking::panic_fmt
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/core/src/panicking.rs:74:14
  10: core::panicking::panic
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/core/src/panicking.rs:148:5
  11: sql::statements::parse_string_to_value
             at /Users/hyi/prs/greptimedb/src/sql/src/statements.rs:140:13
  12: sql::statements::sql_value_to_value
             at /Users/hyi/prs/greptimedb/src/sql/src/statements.rs:263:13
  13: operator::req_convert::insert::stmt_to_region::sql_value_to_grpc_value
             at /Users/hyi/prs/greptimedb/src/operator/src/req_convert/insert/stmt_to_region.rs:217:9
  14: operator::req_convert::insert::stmt_to_region::StatementToRegion::convert::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/req_convert/insert/stmt_to_region.rs:126:29
  15: operator::insert::Inserter::handle_statement_insert::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/insert.rs:285:18
  16: operator::statement::dml::<impl operator::statement::StatementExecutor>::insert::{{closure}}::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/statement/dml.rs:32:18
  17: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  18: operator::statement::dml::<impl operator::statement::StatementExecutor>::insert::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/statement/dml.rs:26:5
  19: operator::statement::StatementExecutor::execute_sql::{{closure}}::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/statement.rs:151:73
  20: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  21: operator::statement::StatementExecutor::execute_sql::{{closure}}
             at /Users/hyi/prs/greptimedb/src/operator/src/statement.rs:134:5
  22: frontend::instance::Instance::query_statement::{{closure}}
             at /Users/hyi/prs/greptimedb/src/frontend/src/instance.rs:267:70
  23: <frontend::instance::Instance as servers::query_handler::sql::SqlQueryHandler>::do_query::{{closure}}::{{closure}}
             at /Users/hyi/prs/greptimedb/src/frontend/src/instance.rs:307:81
  24: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  25: <frontend::instance::Instance as servers::query_handler::sql::SqlQueryHandler>::do_query::{{closure}}
             at /Users/hyi/prs/greptimedb/src/frontend/src/instance.rs:278:5
  26: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  27: <servers::query_handler::sql::ServerSqlQueryHandlerAdapter<E> as servers::query_handler::sql::SqlQueryHandler>::do_query::{{closure}}
             at /Users/hyi/prs/greptimedb/src/servers/src/query_handler/sql.rs:85:14
  28: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  29: servers::postgres::handler::<impl pgwire::api::query::SimpleQueryHandler for servers::postgres::PostgresServerHandlerInner>::do_query::{{closure}}::{{closure}}
             at /Users/hyi/prs/greptimedb/src/servers/src/postgres/handler.rs:80:81
  30: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.40/src/instrument.rs:321:9
  31: servers::postgres::handler::<impl pgwire::api::query::SimpleQueryHandler for servers::postgres::PostgresServerHandlerInner>::do_query::{{closure}}
             at /Users/hyi/prs/greptimedb/src/servers/src/postgres/handler.rs:51:5
  32: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  33: pgwire::api::query::SimpleQueryHandler::on_query::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pgwire-0.28.0/src/api/query.rs:65:61
  34: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  35: pgwire::tokio::server::process_message::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pgwire-0.28.0/src/tokio/server.rs:206:59
  36: pgwire::tokio::server::do_process_socket::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pgwire-0.28.0/src/tokio/server.rs:351:10
  37: pgwire::tokio::server::process_socket::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/pgwire-0.28.0/src/tokio/server.rs:419:10
  38: servers::postgres::server::PostgresServer::accept::{{closure}}::{{closure}}::{{closure}}
             at /Users/hyi/prs/greptimedb/src/servers/src/postgres/server.rs:99:93
  39: <core::pin::Pin<P> as core::future::future::Future>::poll
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/future/future.rs:123:9
  40: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/core.rs:331:17
  41: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/core.rs:320:13
  42: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:499:19
  43: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
  44: std::panicking::try::do_call
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40
  45: ___rust_try
  46: std::panicking::try
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19
      std::panic::catch_unwind
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14
  47: tokio::runtime::task::harness::poll_future
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:487:18
  48: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:209:27
  49: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:154:15
  50: tokio::runtime::task::raw::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/raw.rs:271:5
  51: tokio::runtime::task::raw::RawTask::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/raw.rs:201:18
  52: tokio::runtime::task::LocalNotified<S>::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/mod.rs:435:9
  53: tokio::runtime::scheduler::multi_thread::worker::Context::run_task::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:596:13
  54: tokio::runtime::coop::with_budget
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/coop.rs:107:5
      tokio::runtime::coop::budget
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/coop.rs:73:5
      tokio::runtime::scheduler::multi_thread::worker::Context::run_task
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:595:9
  55: tokio::runtime::scheduler::multi_thread::worker::Context::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:546:24
  56: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:511:21
  57: tokio::runtime::context::scoped::Scoped<T>::set
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/context/scoped.rs:40:9
  58: tokio::runtime::context::set_scheduler::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/context.rs:180:26
  59: std::thread::local::LocalKey<T>::try_with
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:283:12
  60: std::thread::local::LocalKey<T>::with
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/local.rs:260:9
  61: tokio::runtime::context::set_scheduler
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/context.rs:180:9
  62: tokio::runtime::scheduler::multi_thread::worker::run::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:506:9
  63: tokio::runtime::context::runtime::enter_runtime
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/context/runtime.rs:65:16
  64: tokio::runtime::scheduler::multi_thread::worker::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:498:5
  65: tokio::runtime::scheduler::multi_thread::worker::Launch::launch::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/scheduler/multi_thread/worker.rs:464:45
  66: <tokio::runtime::blocking::task::BlockingTask<T> as core::future::future::Future>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/blocking/task.rs:42:21
  67: tokio::runtime::task::core::Core<T,S>::poll::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/core.rs:331:17
  68: tokio::loom::std::unsafe_cell::UnsafeCell<T>::with_mut
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/loom/std/unsafe_cell.rs:16:9
      tokio::runtime::task::core::Core<T,S>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/core.rs:320:13
  69: tokio::runtime::task::harness::poll_future::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:499:19
  70: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
  71: std::panicking::try::do_call
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40
  72: ___rust_try
  73: std::panicking::try
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19
      std::panic::catch_unwind
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14
  74: tokio::runtime::task::harness::poll_future
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:487:18
  75: tokio::runtime::task::harness::Harness<T,S>::poll_inner
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:209:27
  76: tokio::runtime::task::harness::Harness<T,S>::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/harness.rs:154:15
  77: tokio::runtime::task::raw::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/raw.rs:271:5
  78: tokio::runtime::task::raw::RawTask::poll
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/raw.rs:201:18
  79: tokio::runtime::task::UnownedTask<S>::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/task/mod.rs:472:9
  80: tokio::runtime::blocking::pool::Task::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/blocking/pool.rs:161:9
  81: tokio::runtime::blocking::pool::Inner::run
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/blocking/pool.rs:511:17
  82: tokio::runtime::blocking::pool::Spawner::spawn_thread::{{closure}}
             at /Users/hyi/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.42.0/src/runtime/blocking/pool.rs:469:13
  83: std::sys::backtrace::__rust_begin_short_backtrace
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys/backtrace.rs:154:18
  84: std::thread::Builder::spawn_unchecked_::{{closure}}::{{closure}}
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:538:17
  85: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:272:9
  86: std::panicking::try::do_call
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:557:40
  87: ___rust_try
  88: std::panicking::try
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panicking.rs:520:19
      std::panic::catch_unwind
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/panic.rs:358:14
      std::thread::Builder::spawn_unchecked_::{{closure}}
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/std/src/thread/mod.rs:537:30
  89: core::ops::function::FnOnce::call_once{{vtable.shim}}
             at /Users/hyi/.rustup/toolchains/nightly-2024-10-19-aarch64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
  90: <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/alloc/src/boxed.rs:2454:9
      <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/alloc/src/boxed.rs:2454:9
      std::sys::pal::unix::thread::Thread::new::thread_start
             at /rustc/e92993dbb43f0a5d17fe56e2d82f90435d6521c8/library/std/src/sys/pal/unix/thread.rs:105:17
  91: __pthread_deallocate
 panic.file="src/sql/src/statements.rs" panic.line=140 panic.column=13

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory Bugs

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions