You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the interval is unrealistically large that exceeds DateTime's limit, it causes panic.
Error message/log
ERROR: QueryError: Internal(Expr error: Numeric out of range: overflow
Stack backtrace:
0: std::backtrace_rs::backtrace::libunwind::trace
at /rustc/62ebe3a2b177d50ec664798d731b8a8d1a9120d1/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: std::backtrace_rs::backtrace::trace_unsynchronized
at /rustc/62ebe3a2b177d50ec664798d731b8a8d1a9120d1/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: std::backtrace::Backtrace::create
at /rustc/62ebe3a2b177d50ec664798d731b8a8d1a9120d1/library/std/src/backtrace.rs:331:13
3: anyhow::kind::Adhoc::new
at /Users/wutao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/anyhow-1.0.75/src/kind.rs:71:36
4: <risingwave_batch::error::BatchError as core::convert::From<risingwave_common::error::RwError>>::from
at ./src/batch/src/error.rs:68:18
5: risingwave_batch::task::task_execution::BatchTaskExecution<C>::run::{{closure}}
at ./src/batch/src/task/task_execution.rs:633:46
6: <tracing::instrument::Instrumented<T> as core::future::future::Future>::poll
at /Users/wutao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.37/src/instrument.rs:272:9
7: risingwave_batch::task::task_execution::BatchTaskExecution<C>::async_execute::{{closure}}::{{closure}}::{{closure}}::{{closure}}
at ./src/batch/src/task/task_execution.rs:474:22
8: core::ops::function::FnOnce::call_once
at /rustc/62ebe3a2b177d50ec664798d731b8a8d1a9120d1/library/core/src/ops/function.rs:250:5
9: tokio_metrics::task::instrument_poll
at /Users/wutao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-metrics-0.3.0/src/task.rs:2530:15
10: <tokio_metrics::task::Instrumented<T> as core::future::future::Future>::poll
at /Users/wutao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-metrics-0.3.0/src/task.rs:2430:9
11: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::future::future::Future>::poll
at /rustc/62ebe3a2b177d50ec664798d731b8a8d1a9120d1/library/core/src/panic/unwind_safe.rs:296:9
12: <futures_util::future::future::catch_unwind::CatchUnwind<Fut> as core::future::future::Future>::poll::{{closure}}
at /Users/wutao/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.28/src/future/future/catch_unwind.rs:36:42
13: <core::panic::unwind_safe::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
at /rustc/62ebe3a2b177d50ec664798d731b8a8d1a9120d1/library/core/src/panic/unwind_safe.rs:271:9
To Reproduce
Steps to reproduce:
Prepare the data:
CREATETABLEtimestamp_example (
id bigintPRIMARY KEY,
event_timestamp timestamptz
);
INSERT INTO timestamp_example (id, event_timestamp) VALUES (1, '2023-10-11 12:00:00');
select event_timestamp + interval '1000000 years 0 months 0 days' from timestamp_example;
I aslo attempted to create a panic by creating a materialized view on the query, but it was captured and filled with an empty value.
Expected behavior
No panic. Here is postgres's behavior, which returns a normal error instead:
postgres=# select event_timestamp + interval '1000000 years' from timestamp_example;
ERROR: timestamp out of range
xiangjinwu
changed the title
bug: timestamptz + interval overflow causes panic
bug: ExprError from Project displayed with verbose stacktrace in batch
Oct 12, 2023
The stacktrace is added by anyhow!. I have confirmed that by replacing BatchError::from(e) with BatchError::Abort(e.to_string()), it would display a shorter message:
ERROR: QueryError: Aborted("Expr error: Numeric out of range")
@liurenjie1024 Could you help adjust the error transformation here? I am not sure what is the better alternative to "A temp workaround" in this context.
Describe the bug
When the interval is unrealistically large that exceeds DateTime's limit, it causes panic.
Error message/log
To Reproduce
Steps to reproduce:
I aslo attempted to create a panic by creating a materialized view on the query, but it was captured and filled with an empty value.
Expected behavior
No panic. Here is postgres's behavior, which returns a normal error instead:
How did you deploy RisingWave?
No response
The version of RisingWave
9ad7857
Additional context
No response
The text was updated successfully, but these errors were encountered: