New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SUMMARIZE returns error when query contains large values #9978
Comments
This is triggered in |
The last failure is not an error: The cast fails because the number is too large (which is what the error message says): select -9223372036854775808::bigint; |
Since the result is approximate anyway, just clamp extreme values instead of throwing. fixes: duckdb#9978 fixes: duckdblabs/duckdb-internal#903
Good point. There is still an error more like the original one with large negative numbers, though: summarize select hugeint from test_all_types() limit 1;
|
Sorry, didn't mean to close. |
Issue #9978: Approximate Quantile Overflow
What happens?
When
summarize
is used on a query with a result that contains values of some types close to the limits of their ranges, an error is returned.To Reproduce
Running the following command in the CLI returns the error below:
Equivalently, this produces the same error:
Although note that the error occurs with the value
9223372036854775296
, which is a bit smaller than the value9223372036854775807
from test_all_types() (which also produces the error).Note that the following (with the next smallest value from
9223372036854775296
) does not return an error:Also, negative values of some types return similar but different errors:
Note that the cast to BIGINT is needed to produce this error, and the following (with a value one step closer to zero) does not result in an error:
OS:
Mac OS X 13.5.2 (M2 chip)
DuckDB Version:
0.9.3-dev1527
DuckDB Client:
CLI
Full Name:
Jeff Raymakers
Affiliation:
MotherDuck
Have you tried this on the latest
main
branch?I have tested with a main build
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
The text was updated successfully, but these errors were encountered: