mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
done
This commit is contained in:
parent
ff80c1f3ce
commit
2239f9b0c6
@ -7,6 +7,8 @@
|
||||
#include <Common/FieldVisitors.h>
|
||||
#include <IO/WriteHelpers.h>
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
namespace DB
|
||||
{
|
||||
@ -75,11 +77,14 @@ public:
|
||||
/// The maximum width of the bar in characters, by default.
|
||||
Float64 max_width = arguments.size() == 4 ? extractConstant<Float64>(arguments, 3, "Fourth") : 80;
|
||||
|
||||
if (isNaN(max_width))
|
||||
throw Exception("Argument 'max_width' must not be NaN", ErrorCodes::ILLEGAL_TYPE_OF_ARGUMENT);
|
||||
|
||||
if (max_width < 1)
|
||||
throw Exception("Max_width argument must be >= 1.", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
|
||||
throw Exception("Argument 'max_width' must be >= 1", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
|
||||
|
||||
if (max_width > 1000)
|
||||
throw Exception("Too large max_width.", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
|
||||
throw Exception("Argument 'max_width' must be <= 1000", ErrorCodes::ARGUMENT_OUT_OF_BOUND);
|
||||
|
||||
const auto & src = *arguments[0].column;
|
||||
|
||||
|
2
tests/queries/0_stateless/01621_bar_nan_arguments.sql
Normal file
2
tests/queries/0_stateless/01621_bar_nan_arguments.sql
Normal file
@ -0,0 +1,2 @@
|
||||
SELECT bar((greatCircleAngle(65537, 2, 1, 1) - 1) * 65535, 1048576, 1048577, nan); -- { serverError 43 }
|
||||
select bar(1,1,1,nan); -- { serverError 43 }
|
Loading…
Reference in New Issue
Block a user