Anton Popov
0ba78c3c3a
Merge remote-tracking branch 'upstream/master' into HEAD
2022-03-16 15:28:09 +00:00
Maksim Kita
538f8cbaad
Fix clang-tidy warnings in Disks, Formats, Functions folders
2022-03-14 18:17:35 +00:00
Maksim Kita
36dc7f03a4
Fixed tests
2022-03-14 09:14:41 +00:00
Maksim Kita
3a2b3ce503
Standardize behaviour of CAST into IPv4, IPv6, toIPv4, toIPv6 functions
2022-03-12 17:12:05 +00:00
Anton Popov
df3b07fe7c
Merge remote-tracking branch 'upstream/master' into HEAD
2022-03-03 22:25:28 +00:00
HaiBo Li
2ea18b3085
Fix the bug that the toDatetime function overflows ( #32898 )
...
* Fixed overflow bug of the function toDatetime/toDate/toDate32/parseDateTimeBestEffort
2022-03-02 10:06:38 +03:00
Anton Popov
2758db5341
add more comments
2022-03-01 19:32:55 +03:00
zvonand
9456d89fad
Move current work from old laptop
...
skip-checks: true
2022-02-07 21:44:14 +03:00
Anton Popov
aab6ef60b2
better performance of parsing json data
2022-02-01 14:17:29 +03:00
Anton Popov
78b9f15abb
Merge remote-tracking branch 'upstream/master' into HEAD
2022-01-30 03:24:37 +03:00
Maksim Kita
24267c8cfb
Fixed tests
2022-01-27 16:02:31 +00:00
Maksim Kita
af5ad2f370
Remove DecimalPaddedPODArray
2022-01-27 10:07:53 +00:00
Anton Popov
90b74c2aeb
better unflattenTuple
2022-01-27 03:24:34 +03:00
Kruglov Pavel
ed43abbaeb
Update FunctionsConversion.h
2022-01-25 12:32:21 +03:00
avogar
ad01d68f36
Fix parsing IPv6 from query parameter and fix IPv6 to string conversion
2022-01-25 10:09:17 +03:00
Maksim Kita
333bd24aca
Fixed tests
2022-01-23 00:09:29 +00:00
Maksim Kita
4be393fba5
Support cast from Map to Array of Tuple
2022-01-22 20:40:18 +00:00
Anton Popov
e8ce091e68
Merge remote-tracking branch 'upstream/master' into HEAD
2022-01-21 20:11:18 +03:00
avogar
ba54a5ff80
Some improvements and fixes for Bool data type
2022-01-20 14:16:11 +03:00
vdimir
154e7b03c0
Disable FunctionConvertFromString::canBeExecutedOnDefaultArguments
2021-12-29 13:34:54 +03:00
avogar
85d214d560
Fix build
2021-12-23 20:14:54 +03:00
avogar
2e02a6bcca
Try to fix build
2021-12-23 19:47:29 +03:00
avogar
ce68c54b03
Fix comments, reduce extra copying
2021-12-23 19:47:29 +03:00
avogar
5e5d6609ed
Proper cast to bool
2021-12-23 19:47:29 +03:00
avogar
19faf46b68
Improve Bool data type
2021-12-23 19:47:29 +03:00
Anton Popov
63fceca6a8
support nested in json type (wip)
2021-12-01 05:59:56 +03:00
Anton Popov
a20922b2d3
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-11-09 15:36:25 +03:00
mergify[bot]
4f6fd49266
Merge branch 'master' into fix_IP_conversion
2021-11-09 12:11:54 +00:00
lhuang0928
008a13df8b
fix date32 comparison with datetime/datetime64
2021-10-20 03:36:07 +00:00
mergify[bot]
5b667d3cd5
Merge branch 'master' into fix_IP_conversion
2021-10-06 16:40:47 +00:00
Nikolay Degterinsky
345ac59f46
Merge pull request #29552 from MaxWk/conversion-between-date32-and-datetime64
...
Support conversion between date32 and datetime64
2021-10-04 12:43:56 +03:00
alexey-milovidov
ac57e057a1
Merge pull request #23028 from ClickHouse/cast_to_value_or_default
...
Merging #21330
2021-10-03 11:00:48 +03:00
Maksim Kita
c2407fee06
Fixed tests
2021-09-30 14:35:24 +03:00
MaxWk
3cbabe2c68
support conversion between date32 and datetime64
2021-09-30 15:09:36 +08:00
Dmitry Novik
abdd8fb516
Cleanup
2021-09-29 19:42:41 +03:00
Mike Kot
61e0c6208b
Making Monotonicity an aggregate to use with designated initializers
2021-09-29 18:01:26 +02:00
Dmitry Novik
9049fd701f
Refactor ColumnStringHelpers
2021-09-21 17:27:34 +03:00
Vasily Nemkov
175b94fa2d
Special case of conversion code for types with custom serialization/deserialization
...
Fixes CASTing from String or FixedString to IPv4 or IPv6 and back.
2021-09-21 15:34:06 +03:00
Mike Kot
bce011cb33
Replacing IsDecimalNumber
2021-09-11 00:40:18 +02:00
Mike Kot
c4385a2c40
Simplifying exception messages
2021-09-11 00:40:18 +02:00
Anton Popov
b05943f4a4
add text serialization for type Object
2021-08-21 03:31:44 +03:00
Anton Popov
61239343e3
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-08-20 16:33:30 +03:00
alexey-milovidov
eb3bbdfab5
Merge pull request #27680 from ClickHouse/decimal-no-trailing-zeros
...
Remove trailing zeros from Decimal serialization #15794
2021-08-18 05:24:13 +03:00
Pavel Kruglov
7c98fc11b9
Fix performance, make only one setting
2021-08-16 14:30:56 +03:00
Alexey Milovidov
8adaef7c8e
Make text format for Decimal tuneable
2021-08-16 11:03:23 +03:00
mergify[bot]
319e5af6eb
Merge branch 'master' into short-circuit
2021-08-13 13:01:46 +00:00
kssenii
dcc6f597dc
Move templates from FunctionsConvertion
2021-08-11 19:09:51 +00:00
kssenii
7555fc19fd
Revert "Move some templates"
...
This reverts commit 7f247becca
.
2021-08-11 18:49:25 +00:00
kssenii
7f247becca
Move some templates
2021-08-11 07:32:46 +00:00
Anton Popov
5a2daae63a
add conversion from tuple to object
2021-08-10 04:33:57 +03:00
Pavel Kruglov
1fa8901cdb
Mark functions conversion as suitable for short-circuit
2021-08-09 18:02:09 +03:00
Pavel Kruglov
70b51133c1
Try to simplify code
2021-08-09 18:01:08 +03:00
Pavel Kruglov
bff79d7774
Fix special build
2021-08-09 17:57:50 +03:00
Pavel Kruglov
a95d45a157
Some clean up
2021-08-09 17:57:02 +03:00
Pavel Kruglov
3ec2ab6156
Avoid using expand, fix bugs, add tests and comments
2021-08-09 17:54:49 +03:00
Pavel Kruglov
0662df8b76
Fix performance with JIT, add arguments to function isSuitableForShortCircuitArgumentsExecution
2021-08-09 17:54:14 +03:00
Pavel Kruglov
e792fa588f
Mark all Functions as sutable or not for executing as short circuit arguments
2021-08-09 17:50:09 +03:00
kssenii
01b4bd3f91
Fix some more tests
2021-08-07 14:28:12 +00:00
kssenii
ec9e82fb0c
Fix some tests
2021-08-07 10:12:59 +00:00
kssenii
9ca422f0c5
Introduce CAST for internal usage
2021-08-07 09:03:10 +00:00
Anton Popov
f99374cca6
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-07-20 18:20:21 +03:00
kssenii
9cb10aae3c
Some fixes
2021-07-18 03:43:08 +00:00
kssenii
3ba2d114d5
Revert "Merge pull request #26352 from ClickHouse/revert-25774-datatype-date32"
...
This reverts commit 94a210650f
, reversing
changes made to 0893b9ff8e
.
2021-07-15 11:41:52 +00:00
alexey-milovidov
9ba4064c86
Revert "Datatype Date32, support range 1925 to 2283"
2021-07-15 10:53:35 +03:00
Vladimir
c6177bd0cc
Merge pull request #26123 from vdimir/issue-25806-null-enum-to-str
2021-07-14 10:22:37 +03:00
vdimir
a01f8c147d
Move check of null_map outside of loop in ConvertImpl::execute for toString
2021-07-13 09:52:31 +03:00
vdimir
c938a53e88
Fixes for FunctionConversion implementation for nulls
2021-07-13 09:48:05 +03:00
vdimir
b4c6a17eb2
Add ReturnType template parameter to FormatImpl::execute
2021-07-13 09:48:05 +03:00
vdimir
32b174403e
Nullable in ConvertImplGenericToString
2021-07-13 09:48:04 +03:00
vdimir
3a0a456549
Do not try catch in ConvertImpl::execute
2021-07-13 09:48:04 +03:00
vdimir
5b18480a49
Return null if value can't be converted in toString for nullable
2021-07-13 09:48:04 +03:00
vdimir
7c4c2b29c2
Do not throw exception for unexpected values in enum during to string conversion
2021-07-13 09:48:04 +03:00
Anton Popov
072e65b728
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-07-07 17:20:38 +03:00
neng.liu
ec7604b013
add parquet test and fix add interval error when type is date32
2021-06-28 16:36:54 +08:00
Neng Liu
7ed1728a37
Merge branch 'master' into datatype-date32
...
# Conflicts:
# src/DataTypes/IDataType.h
# src/Functions/CustomWeekTransforms.h
2021-06-22 10:00:18 +08:00
Alexey Milovidov
3e71181451
Whitespaces
2021-06-18 01:42:33 +03:00
Maksim Kita
67e9b85951
Merge ext into common
2021-06-16 23:28:41 +03:00
Neng Liu
88a0d0be62
add datetype32 part2
2021-06-08 20:31:41 +08:00
Anton Popov
205a23282b
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-06-07 19:38:22 +03:00
mergify[bot]
d68d5e0ef1
Merge branch 'master' into rename-const-context-ptr
2021-06-04 14:41:41 +00:00
Kruglov Pavel
8acf031c1b
Merge pull request #24398 from Avogar/fix-deltasum
...
Fix logical error AggregateFunctionFactory returned nullptr
2021-06-03 19:40:06 +03:00
Nikolai Kochetov
dbaa6ffc62
Rename ContextConstPtr to ContextPtr.
2021-06-01 15:20:52 +03:00
Anton Popov
9f52362b81
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-05-31 23:08:45 +03:00
Alexander Kuzmenkov
3f57fc085b
remove mutable context references from functions interface
...
Also remove it from some visitors.
2021-05-28 19:45:37 +03:00
Pavel Kruglov
42d57138f2
replace all isDateOrDateTime invocations to explicit calls to isDate and isDateTime and isDateTime64
2021-05-28 15:34:49 +03:00
Anton Popov
041e2def3e
fix conversion of tuples
2021-05-28 03:53:39 +03:00
Anton Popov
d83819fcae
fix build
2021-05-26 18:34:34 +03:00
Anton Popov
13ae56985f
dynamic subcolumns: better handling of missed values
2021-05-26 05:41:38 +03:00
Anton Popov
0bdf9d207c
Merge remote-tracking branch 'origin/sparse-serialization' into HEAD
2021-05-26 00:25:47 +03:00
Anton Popov
35e2cc7b2b
fix several cases in cast operator
2021-05-25 02:50:28 +03:00
Maksim Kita
fa24fe82e1
Fixed FunctionConversion tests
2021-05-16 18:17:05 +03:00
Maksim Kita
947f28d430
IFunction refactoring
2021-05-15 20:33:15 +03:00
Alexey Milovidov
02ce9cc725
Untangle UUID
2021-05-04 01:46:51 +03:00
Alexey Milovidov
0677787d90
Fix abysmally low performance
2021-05-03 22:56:40 +03:00
Alexey Milovidov
8ecd9d36e6
Add UInt128 conversion functions
2021-05-03 18:41:37 +03:00
Anton Popov
3bc2a0820c
dynamic subcolumns: support merges
2021-05-03 03:56:19 +03:00
Alexey Milovidov
649550c5ab
Attempt to normalize big integers
2021-04-25 12:30:43 +03:00
Maksim Kita
ddcffcb723
Fixed tests
2021-04-22 00:19:01 +03:00
Maksim Kita
631d870ae3
Cast to array from empty array
2021-04-21 20:29:49 +03:00
Ivan
495c6e03aa
Replace all Context references with std::weak_ptr ( #22297 )
...
* Replace all Context references with std::weak_ptr
* Fix shared context captured by value
* Fix build
* Fix Context with named sessions
* Fix copy context
* Fix gcc build
* Merge with master and fix build
* Fix gcc-9 build
2021-04-11 02:33:54 +03:00
Anton Popov
329c9033a8
fix conversion from const map with nulls
2021-04-09 20:50:10 +03:00
Anton Popov
6a15431be7
Merge remote-tracking branch 'upstream/master' into HEAD
2021-03-25 15:57:35 +03:00
alexey-milovidov
150a2df9df
Merge pull request #22026 from kitaisreal/cast-to-enum-nullable-fix
...
Cast to enum nullable fix
2021-03-23 23:51:19 +03:00
Maksim Kita
75f5679bf0
Cast to enum nullable fix
2021-03-23 14:58:00 +03:00
Alexey Milovidov
3f67f4f47b
Saturation for DateTime
2021-03-15 23:40:33 +03:00
Anton Popov
81ac6382a3
slightly better performance
2021-03-13 21:05:18 +03:00
Anton Popov
bc417cf54a
refactoring of serializations
2021-03-09 17:46:52 +03:00
Alexey Milovidov
4e8239e098
Merge branch 'master' into DateTime64_extended_range
2021-03-03 23:43:20 +03:00
Vasily Nemkov
2d03d330bc
Extended range of DateTime64 to years 1925 - 2238
...
The Year 1925 is a starting point because most of the timezones
switched to saner (mostly 15-minutes based) offsets somewhere
during 1924 or before. And that significantly simplifies implementation.
2238 is to simplify arithmetics for sanitizing LUT index access;
there are less than 0x1ffff days from 1925.
* Extended DateLUTImpl internal LUT to 0x1ffff items, some of which
represent negative (pre-1970) time values.
As a collateral benefit, Date now correctly supports dates up to 2149
(instead of 2106).
* Added a new strong typedef ExtendedDayNum, which represents dates
pre-1970 and post 2149.
* Functions that used to return DayNum now return ExtendedDayNum.
* Refactored DateLUTImpl to untie DayNum from the dual role of being
a value and an index (due to negative time). Index is now a different
type LUTIndex with explicit conversion functions from DatNum, time_t,
and ExtendedDayNum.
* Updated DateLUTImpl to properly support values close to epoch start
(1970-01-01 00:00), including negative ones.
* Reduced resolution of DateLUTImpl::Values::time_at_offset_change
to multiple of 15-minutes to allow storing 64-bits of time_t in
DateLUTImpl::Value while keeping same size.
* Minor performance updates to DateLUTImpl when building month LUT
by skipping non-start-of-month days.
* Fixed extractTimeZoneFromFunctionArguments to work correctly
with DateTime64.
* New unit-tests and stateless integration tests for both DateTime
and DateTime64.
2021-02-24 17:08:35 +02:00
hexiaoting
e123c6ef9d
Bug fix: Tuple cast to Map
2021-02-23 18:42:33 +08:00
Azat Khuzhin
521537eed8
Fix DateTime64 from Float
2021-02-21 22:36:40 +03:00
Alexey Milovidov
4085782b05
More gentle exception messages
2021-02-21 15:34:48 +03:00
Azat Khuzhin
46ff7d2ab0
Fix DateTime64 overflows
2021-02-07 02:24:31 +03:00
Azat Khuzhin
c4b5eed4ff
Fix DateTime64 initialization (to match DateTime behaviour)
...
There was no specializations for toDateTime64(<numeric>), and because of
this default decimal conversion was used, however this is not enough for
DateTime/DateTime64 types, since the date may overflow and the proper
check is required (like DateTime has), and this what UBsan found [1]:
../src/IO/WriteHelpers.h:812:33: runtime error: index 508 out of bounds for type 'const char [201]' Received signal -3 Received signal Unknown signal (-3)
Backtrace:
(gdb) bt
0 LocalDateTime::LocalDateTime (this=0x7fffffff8418, year_=1970, month_=1 '\001', day_=1 '\001', hour_=2 '\002', minute_=0 '\000', second_=254 '\376') at LocalDateTime.h:83
1 0x00000000138a5edb in DB::writeDateTimeText<(char)45, (char)58, (char)32, (char)46> (datetime64=..., scale=7, buf=..., date_lut=...) at WriteHelpers.h:852
2 0x0000000019c379b4 in DB::DataTypeDateTime64::serializeText (this=0x7ffff5c4b0d8, column=..., row_num=0, ostr=..., settings=...) at DataTypeDateTime64.cpp:66
3 0x0000000019d297e4 in DB::IDataType::serializeAsText (this=0x7ffff5c4b0d8, column=..., row_num=0, ostr=..., settings=...) at IDataType.cpp:387
[1]: https://clickhouse-test-reports.s3.yandex.net/19527/cea8ae162ffbf92e5ed29304ab010704c5d611c8/fuzzer_ubsan/report.html#fail1
Also fix CAST for DateTime64
2021-02-06 13:04:53 +03:00
Azat Khuzhin
0627ba0e36
Fix timezone argument for DateTime64
...
It should be marked with always const, otherwise it will bail:
Code: 44, e.displayText() = DB::Exception: Illegal column String of time zone argument of function, must be constant string: While processing toDateTime(-1, 1, 'GMT'), Stack trace (when copying this message, always include the lines below):
2021-02-06 13:04:53 +03:00
Maksim Kita
9db9ce11dc
Added functions parseDateTimeBestEffortUSOrZero, parseDateTimeBestEffortUSOrNull
2021-01-27 17:10:06 +03:00
Maksim Kita
d712748304
Function accurateCastOrNull fixed unitialized values for numeric cast
2021-01-22 16:24:51 +03:00
tavplubix
00d240853d
Merge pull request #18718 from zhang2014/fix/ISSUES-7690
...
ISSUES-7690 try fix nullable string type convert to decimal type
2021-01-11 16:18:56 +03:00
zhang2014
cccafcfc3d
try fix build failure
2021-01-08 18:29:51 +08:00
Alexey Milovidov
039edbb724
Don't allow conversion between UUID and numeric types
2021-01-05 01:33:59 +03:00
zhang2014
84ddff92f2
ISSUES-7690 try fix nullable string type convert to decimal type
2021-01-04 20:40:33 +08:00
Anton Popov
721bb60edd
fix cast to map from tuple of arrays with unequal sizes
2020-12-25 20:12:47 +03:00
Alexander Tokmakov
c49a6302fa
fix, add test
2020-12-24 03:13:53 +03:00
Alexander Tokmakov
317df5f5d2
try fix 'value is too short' when converting from String to Nullable(T)
2020-12-24 00:57:33 +03:00
alexey-milovidov
6fc3ca8b7b
Merge pull request #16724 from kitaisreal/added-function-accurate-cast-or-null
...
Added function accurateCastOrNull, allow different types inside IN subquery
2020-12-18 00:45:27 +03:00
Maksim Kita
9aaa2f9345
Fixed compilation timeout
2020-12-17 21:32:25 +03:00
Anton Popov
b485b5bd1c
minor fixes and comments added
2020-12-16 01:22:21 +03:00
Maksim Kita
4e3cc606e6
Fixed tests
2020-12-15 23:36:45 +03:00
Maksim Kita
51f53ce8e9
Added tryParseDecimal functions
2020-12-15 21:54:16 +03:00
Anton Popov
dd09e1d783
fix type map ser/de to json
2020-12-15 17:34:37 +03:00
Anton Popov
afc2d7099b
add conversion from array to map
2020-12-15 01:16:04 +03:00
Maksim Kita
17b43ca721
Fixed tests
2020-12-14 22:12:15 +03:00
Maksim Kita
16a30eb4aa
Updated non-finite floating conversion into int
2020-12-14 22:12:15 +03:00
Maksim Kita
0b565b679e
Fixed Set execute for columns that cannot be inside Nullable
2020-12-14 22:12:15 +03:00
Maksim Kita
18dc118298
Fixed compile issues
2020-12-14 22:12:15 +03:00
Maksim Kita
0464859cfe
Updated usage of different types during IN query
...
1. Added accurateCast function.
2. Use accurateCast in Set during execute.
3. Added accurateCast tests.
4. Updated select_in_different_types tests.
2020-12-14 22:12:15 +03:00
Maksim Kita
f4b8e8ef99
Allow different types inside IN subquery
2020-12-14 22:12:15 +03:00
Maksim Kita
dd072a20c9
Fixed compile issues
2020-12-14 22:12:15 +03:00
Maksim Kita
4435642e39
Fixed style issues
2020-12-14 22:12:15 +03:00
Maksim Kita
db5d0944ed
Added Decimal support
2020-12-14 22:12:15 +03:00
Maksim Kita
baad78d2f2
Fixed setting null value in vector. Updated tests.
2020-12-14 22:12:15 +03:00
Maksim Kita
4cd5025e83
Added numeric limits for UInt128
2020-12-14 22:12:15 +03:00
Maksim Kita
d636e1618b
Added function accurate cast or null
2020-12-14 22:12:15 +03:00
Anton Popov
6b09669d66
data type map: several fixes
2020-12-05 22:36:09 +03:00
Anton Popov
12604ce0e6
Merge branch 'dev_map2' of git://github.com/hexiaoting/ClickHouse into merging-map
2020-12-01 14:52:30 +03:00
Azat Khuzhin
ee38cce1bf
Fix toUnixTimestamp(Date()) error (use type name not column type name)
...
Was:
Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Illegal column UInt16 of first argument of function toUnixTimestamp: While processing toUnixTimestamp(today()).
Now:
Code: 44. DB::Exception: Received from localhost:9000. DB::Exception: Illegal type Date of first argument of function toUnixTimestamp: While processing toUnixTimestamp(today()).
2020-11-28 15:05:48 +03:00
hexiaoting
5b3a7f5c98
Merge remote-tracking branch 'origin/master' into dev_map2
2020-11-26 16:43:27 +08:00
Azat Khuzhin
17f6c82ffa
Prohibit toUnixTimestamp(Date())
...
Making it implicitly cast to Date() does not looks correct, since before
it returns somewhat unexpected result:
SELECT toUnixTimestamp(today())
┌─toUnixTimestamp(today())─┐
│ 18591 │
└──────────────────────────┘
2020-11-25 00:26:14 +03:00
alexey-milovidov
1663b13215
Merge pull request #17257 from ucasFL/fix
...
fix toUInt256 stack overflow
2020-11-21 22:54:06 +03:00
fenglv
268b15f221
fix toUInt256 stack overflow
2020-11-21 12:59:40 +00:00
Nikolai Kochetov
cf678b6092
Merge branch 'master' into order-inputs-in-action-dag
2020-11-21 13:54:50 +03:00
Nikolai Kochetov
266596783a
Remove Converting transform and step.
2020-11-18 12:45:46 +03:00
Nikolai Kochetov
947a29e378
Remove Converting transform and step.
2020-11-18 12:38:03 +03:00
Nikolai Kochetov
354620b5a1
Remove Converting transform and step.
2020-11-18 12:35:32 +03:00
Ivan Lezhankin
f897f7c93f
Refactor IFunction to execute with const arguments
2020-11-17 16:24:45 +03:00
hexiaoting
66bca89001
Style error fix
2020-11-02 17:23:02 +08:00
hexiaoting
3a70cf3773
Merge remote-tracking branch 'origin/master' into dev_map2
2020-11-02 14:46:56 +08:00
hexiaoting
e1ff6c3870
Update codes
2020-11-02 14:46:32 +08:00
hexiaoting
619fe6b10b
Merge remote-tracking branch 'hexiaoting/dev_map2' into dev_map2
2020-11-02 14:07:00 +08:00
hexiaoting
2ba68d7494
Add map function
2020-11-02 14:05:53 +08:00
Vasily Nemkov
e0d85ffd1d
Allow casting Tuple as Map.
...
SELECT CAST(([1, 2, 3], ['1', '2', 'foo']), 'Map(UInt8, String)') AS map
2020-10-28 12:41:11 +03:00
Anton Popov
5fbca7d62d
Merge pull request #16337 from kitaisreal/uuid-safe-cast-functions-added
...
UUID safe cast functions added
2020-10-26 16:03:27 +03:00
Maksim Kita
440ae2bc57
UUID safe cast functions added
...
1. Added readUUIDTextImpl, readUUIDText, tryReadUUIDText functions in
ReadHelpers.
2. Added toUUIDOrNull, toUUIDOrZero functions based on ReadHelpers read
implementations.
3. Updated documentation.
2020-10-25 11:45:29 +03:00
hexiaoting
483be134b2
Support MergeTree Engine
2020-10-23 16:36:17 +08:00
Nikolai Kochetov
19ccce0305
Fix gcc build.
2020-10-20 18:56:05 +03:00
Nikolai Kochetov
295e612343
Fix build and tests.
2020-10-20 16:11:57 +03:00
Nikolai Kochetov
bc58637ec2
Fixing build.
2020-10-19 21:37:44 +03:00
hexiaoting
fcd35b0619
Merge branch 'master' into dev_map2
2020-10-18 16:18:13 +08:00
Nikolai Kochetov
139487a1a0
Part 1.
2020-10-17 17:23:37 +03:00
Nikolai Kochetov
959424f28a
Rename block to columns.
2020-10-14 17:04:50 +03:00
Nikolai Kochetov
966b1d6cf5
Rename Block to ColumnsWithTypeAndName.
2020-10-14 16:09:11 +03:00
hexiaoting
cb9e88efa3
Update with fresh master to build sucessfully.
2020-10-14 15:35:22 +08:00
hexiaoting
cdb4dd57a6
Add new DataType Map(key,value)
2020-10-14 14:35:14 +08:00
Nikolai Kochetov
3a17c2a7ac
Rename FunctionArguments to ColumnsWithTypeAndName
2020-10-11 22:20:20 +03:00
Nikolai Kochetov
0df08dcb36
Rename columns() to size().
2020-10-11 21:11:39 +03:00
Nikolai Kochetov
d28325a353
Replace getByPosition to []
2020-10-10 21:24:57 +03:00
Nikolai Kochetov
a7fb2e38a5
Use ColumnWithTypeAndName as function argument instead of Block.
2020-10-09 10:41:28 +03:00
Amos Bird
654245af3c
Fix signedness conversion monotonicity
2020-09-14 18:11:40 +08:00
Amos Bird
4c3c1cdaf3
Fix Nullable String to Enum conversion.
2020-09-07 15:32:44 +08:00
alexey-milovidov
adf50fd774
Merge pull request #13761 from zhang2014/improvement/date_time
...
ISSUES-4006 add precision argument for DateTime type
2020-09-02 05:12:35 +03:00
Artem Zuikov
d304d522cc
Refactoring: rename types to allow change bigint library ( #14219 )
2020-09-01 12:54:50 +03:00
Artem Zuikov
fe5db661ce
fix decimal to float conversion and toDecimal256()
2020-08-26 15:26:12 +03:00
zhang2014
b679b2e30c
ISSUES-4006 fix toDateTime64 with scale 0
2020-08-21 13:16:50 +08:00
zhang2014
ec1572d7be
ISSUES-4006 support parserDateTime32 functions
2020-08-21 13:09:25 +08:00
zhang2014
45cc0778a0
ISSUES-4006 support scale with parserDateTime
2020-08-20 22:41:13 +08:00
zhang2014
edeb983eb0
ISSUES-4006 some refactor
2020-08-20 19:18:29 +08:00
Artem Zuikov
becc186c91
Add support for extended precision integers and decimals ( #13097 )
2020-08-19 14:52:17 +03:00
zhang2014
fb1417db71
ISSUES-4006 try fix test failure
2020-08-16 01:08:03 +08:00
zhang2014
43839a97b6
ISSUES-4006 add factor with DateTime type
2020-08-15 21:29:24 +08:00
alexey-milovidov
be38b0fe75
Merge pull request #13497 from amosbird/tdm
...
Better toDate/toDateTime functions.
2020-08-09 02:14:58 +03:00
Amos Bird
d9de96716a
string to date is not monotonic
2020-08-08 14:30:50 +08:00
Alexey Milovidov
edd89a8610
Fix half of typos
2020-08-08 03:47:03 +03:00
alexey-milovidov
cbe9878e9e
Update FunctionsConversion.h
2020-08-07 22:53:52 +03:00
alexey-milovidov
65b3863a9e
Update FunctionsConversion.h
2020-08-07 22:52:21 +03:00
Amos Bird
9938e1f3f6
Better toDate/toDateTime function.
2020-08-08 03:38:34 +08:00
Azat Khuzhin
4713b59159
Fix CAST(Nullable(String), Enum())
...
The wrapper that is returned from createStringToEnumWrapper() does not
have access to the ColumnNullable (i.e. original column), because it is
converted to nested type in the prepareRemoveNullable().
So add original ColumnNullable into the block in prepareRemoveNullable()
if source type is Nullable and pass this flag to the
createStringToEnumWrapper() to make it know about that fact that last
column in the block is the original ColumnNullable in this case.
And this one looks most sane.
2020-07-26 12:00:24 +03:00
Nikolai Kochetov
e4689ce302
Make IFunction::executeImpl const.
2020-07-21 16:58:07 +03:00
flynn
5816858403
add parseDateTimeBestEffortUS function ( #12028 )
...
* add function parseDateTimeBestEffortUS
* add test
* add doc
Co-authored-by: alexey-milovidov <milovidov@yandex-team.ru>
2020-07-05 21:09:20 +03:00
Alexey Milovidov
1462a66d1e
Fix typos
2020-06-27 22:05:00 +03:00
Alexey Milovidov
15272d9e60
Fix style
2020-06-20 20:05:47 +03:00
Alexey Milovidov
4867934204
Every function in its own file
2020-06-20 18:45:50 +03:00
Artem Zuikov
6af36cb703
CAST keep nullable ( #11733 )
2020-06-18 13:18:28 +03:00
Alexey Milovidov
fae12d5e42
Return NULL or zero when value is not parsed completely in parseDateTimeBestEffortOr* functions
2020-06-14 04:45:03 +03:00
Alexey Milovidov
41bfa8a275
Addition to prev. revision
2020-05-30 19:35:59 +03:00
Alexey Milovidov
326d2f9af8
Fix uninitialized memory in conversion
2020-05-30 19:21:14 +03:00
Vasily Nemkov
403aae9126
Fixed parseDateTime64BestEffort implementation
...
Fixed argument resolution issues.
Added tests and made sure -orNull and -orZero variants alwo work correctly.
2020-05-21 17:21:39 +03:00
Azat Khuzhin
f29e5c60a5
Add const qualifier for IFunction::isInjective()
2020-04-18 01:50:15 +03:00
Alexey Milovidov
d43903211a
Better exception message #9810
2020-04-12 05:51:56 +03:00
Amos Bird
f1cb928737
more monotonicity for toString()
2020-04-08 20:13:44 +08:00
Ivan Lezhankin
06446b4f08
dbms/ → src/
2020-04-03 18:14:31 +03:00