Merge pull request #71870 from cwurm/patch-6

Format Settings: Better date_time_overflow_behavior
This commit is contained in:
Nikita Mikhaylov 2024-12-11 13:50:24 +00:00 committed by GitHub
commit 34ee0f2364
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1231,7 +1231,15 @@ Execute a pipeline for reading dictionary source in several threads. It's suppor
Prefer more precise (but slower) float parsing algorithm
)", 0) \
DECLARE(DateTimeOverflowBehavior, date_time_overflow_behavior, "ignore", R"(
Overflow mode for Date, Date32, DateTime, DateTime64 types. Possible values: 'ignore', 'throw', 'saturate'.
Defines the behavior when [Date](../../sql-reference/data-types/date.md), [Date32](../../sql-reference/data-types/date32.md), [DateTime](../../sql-reference/data-types/datetime.md), [DateTime64](../../sql-reference/data-types/datetime64.md) or integers are converted into Date, Date32, DateTime or DateTime64 but the value cannot be represented in the result type.
Possible values:
- `ignore` Silently ignore overflows. The result is random.
- `throw` Throw an exception in case of conversion overflow.
- `saturate` Silently saturate the result. If the value is smaller than the smallest value that can be represented by the target type, the result is chosen as the smallest representable value. If the value is bigger than the largest value that can be represented by the target type, the result is chosen as the largest representable value.
Default value: `ignore`.
)", 0) \
DECLARE(Bool, validate_experimental_and_suspicious_types_inside_nested_types, true, R"(
Validate usage of experimental and suspicious types inside nested types like Array/Map/Tuple