mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
decimal_check_overflow [CLICKHOUSE-3765]
This commit is contained in:
parent
939949730d
commit
1ea6bc9691
@ -20,8 +20,8 @@ namespace ErrorCodes
|
||||
}
|
||||
|
||||
|
||||
bool decimalCheckComparisonOverflow(const Context & context) { return context.getSettingsRef().decimal_check_comparison_overflow; }
|
||||
bool decimalCheckArithmeticOverflow(const Context & context) { return context.getSettingsRef().decimal_check_arithmetic_overflow; }
|
||||
bool decimalCheckComparisonOverflow(const Context & context) { return context.getSettingsRef().decimal_check_overflow; }
|
||||
bool decimalCheckArithmeticOverflow(const Context & context) { return context.getSettingsRef().decimal_check_overflow; }
|
||||
|
||||
|
||||
//
|
||||
|
@ -281,8 +281,7 @@ struct Settings
|
||||
M(SettingBool, low_cardinality_use_single_dictionary_for_part, false, "LowCardinality type serialization setting. If is true, than will use additional keys when global dictionary overflows. Otherwise, will create several shared dictionaries.") \
|
||||
M(SettingBool, allow_experimental_low_cardinality_type, false, "Allows to create table with LowCardinality types.") \
|
||||
M(SettingBool, allow_experimental_decimal_type, false, "Enables Decimal data type.") \
|
||||
M(SettingBool, decimal_check_comparison_overflow, true, "Check overflow of decimal comparison operations") \
|
||||
M(SettingBool, decimal_check_arithmetic_overflow, true, "Check overflow of decimal arithmetic operations") \
|
||||
M(SettingBool, decimal_check_overflow, true, "Check overflow of decimal arithmetic/comparison operations") \
|
||||
\
|
||||
M(SettingBool, prefer_localhost_replica, 1, "1 - always send query to local replica, if it exists. 0 - choose replica to send query between local and remote ones according to load_balancing") \
|
||||
M(SettingUInt64, max_fetch_partition_retries_count, 5, "Amount of retries while fetching partition from another host.") \
|
||||
|
@ -58,7 +58,7 @@ SELECT 21 + j, 21 - j, 84 - j, 21 * j, -21 * j, 21 / j, 84 / j FROM test.decimal
|
||||
SELECT a, -a, -b, -c, -d, -e, -f, -g, -h, -j from test.decimal ORDER BY a;
|
||||
SELECT abs(a), abs(b), abs(c), abs(d), abs(e), abs(f), abs(g), abs(h), abs(j) from test.decimal ORDER BY a;
|
||||
|
||||
SET decimal_check_arithmetic_overflow = 0;
|
||||
SET decimal_check_overflow = 0;
|
||||
|
||||
SELECT (h * h) != 0, (h / h) != 1 FROM test.decimal WHERE h > 0;
|
||||
SELECT (i * i) != 0, (i / i) = 1 FROM test.decimal WHERE i > 0;
|
||||
|
Loading…
Reference in New Issue
Block a user