Commit Graph

410 Commits

Author SHA1 Message Date
yariks5s
767cac44da minor requests 2023-09-05 08:13:12 +00:00
yariks5s
033970716e fixed tests 2023-09-04 13:30:24 +00:00
Yarik Briukhovetskyi
1d270fca28
Updated FunctionsConversion.h 2023-09-01 18:30:39 +02:00
Yarik Briukhovetskyi
278cc494a2
Updated FunctionsConversion.h 2023-09-01 17:40:04 +02:00
yariks5s
1e01aa917a Updated FunctionsConversion.h 2023-09-01 14:18:29 +00:00
yariks5s
c9f1ff03db Minor fixes 2023-09-01 14:14:00 +00:00
yariks5s
0c9653dac5 implemented for formatDateTime and toString 2023-09-01 14:01:06 +00:00
yariks5s
c11ed5feb4 support for non-const timezone arguments/strings 2023-08-22 10:57:58 +00:00
Austin Kothig
6b42975d33
Change BE-UUID to work the same as LE-UUID. Included high and low getters to provide cleaner code when accessing undertype. 2023-08-18 08:19:46 -07:00
zvonand
490554eb4f simplify 2023-08-01 18:29:44 +02:00
zvonand
9ab875f5ad add explicit nullptr for now 2023-08-01 11:38:15 +02:00
Andrey Zvonov
99cd8f9ba9
Merge branch 'master' into zvonand-float-parsing 2023-07-31 23:43:24 +03:00
zvonand
2088f846ad update as per reviews 2023-07-31 16:26:18 +02:00
zvonand
0ff0a4e41f diverge parsing methods 2023-07-30 19:42:10 +02:00
Dmitry Kardymon
407a7e3cc5 Edit assert message 2023-06-30 09:55:55 +00:00
Dmitry Kardymon
8af96f7a17 Add uuid to uint128 converting 2023-06-30 09:49:29 +00:00
Yakov Olkhovskiy
09806bc363
Merge branch 'master' into cast-ipv6-to-ipv4 2023-06-23 10:53:46 -04:00
zvonand
4155d13d69 merge master and resolve conflict 2023-06-16 02:20:32 +02:00
Robert Schulze
128e8c20d5
Merge pull request #50709 from arenadata/ADQM-867
Added numeric arguments support to some Date/DateTime conversion functions
2023-06-12 17:08:14 +02:00
Robert Schulze
72b9d75a84
Add compat setting for non-const timezones
SQL function toTimezone() converts a Date or DateTime into another
timezone. The problem is that the timezone is part of the Date /
DateTime type but not part of the internal representation (value). This
led to the fact that toTimeZone() wqith non-const timezones produced
wrong and misleading results until #48471 (shipped with v23.4) enforced
a const timezone.

Unfortunately, this PR also broke existing table definitions with
non-const timezones, e.g. in ALIAS expressions. So while #48471
addressed the issue appropriately, it is really backwards-incompatible.

This PR adds a setting to toggle the behavior and makes it also part of
the compatibility profile.
2023-06-10 16:56:42 +00:00
Dmitry Kardymon
d0c2c1dbad Add test and reorder if's 2023-06-09 12:06:43 +00:00
Dmitry Kardymon
de70e322cf Fix by pull request comments 2023-06-09 10:29:44 +00:00
Dmitry Kardymon
cf886d8ced Remove IsConvertible() 2023-06-06 11:08:21 +00:00
Dmitry Kardymon
c7088a8180 Trying to fix build 2023-06-02 07:26:55 +00:00
Dmitry Kardymon
8a10baec7f Add dateTime range check 2023-06-02 06:25:00 +00:00
Dmitry Kardymon
a22e80eed5 Remove whitespaces 2023-06-01 19:52:48 +00:00
Dmitry Kardymon
38abcd1c44 Add nullable support to DateTimeTransformImpl 2023-06-01 19:25:53 +00:00
Dmitry Kardymon
54d526c75c Add cast type supprt to DateTimeTransformImpl 2023-06-01 14:22:57 +00:00
Yakov Olkhovskiy
3af7e0a6fa
better exception message 2023-05-31 11:26:58 -04:00
Dmitry Kardymon
c25980bcf4 Trying to fix toDateOrDefault() 2023-05-30 12:02:44 +00:00
Andrey Zvonov
87fc780c14
Merge branch 'master' into zvonand-implicit-tz 2023-05-30 13:13:46 +03:00
Victor Krasnov
98aace14ae Add DATE_SECONDS_PER_DAY macro definition to replace the numeric literal 86400 2023-05-22 09:23:23 +00:00
Victor Krasnov
83d066e5cf Re-enable Date and Date32 as parameters of toUnixTimestamp function 2023-05-18 09:07:27 +00:00
Yakov Olkhovskiy
24067ea977 allow conversion for toIPv4OrDefault 2023-05-12 15:54:50 +00:00
Yakov Olkhovskiy
108e256578 allow to cast IPv4 to IPv6 2023-05-11 16:17:52 +00:00
Yakov Olkhovskiy
58bdcc2931 allow to cast IPv6 to IPv4 for address in proper mapping block 2023-05-10 23:55:13 +00:00
zvonand
8d0644e793 cleanup 2023-05-09 23:02:03 +02:00
zvonand
297188ce58 fix Date32 2023-05-09 22:37:25 +02:00
zvonand
1751ccc7ac fix stateless 2023-05-09 14:18:04 +02:00
zvonand
3fedd683ef speedup vol. II 2023-05-08 22:28:31 +02:00
zvonand
8338d54c34 Merge branch 'master' of github.com:ClickHouse/ClickHouse into zvonand-implicit-tz 2023-05-05 15:50:26 +02:00
zvonand
a218f010e8 First portion of speedup
Do not generate DateLUT for each serialized and deserialized
date
2023-05-05 14:12:14 +02:00
Raúl Marín
7bdc5fa88f Fix some typos in conversion functions 2023-04-26 20:45:11 +02:00
Anton Popov
1f58dcabae
Merge branch 'master' into rework-map-functions 2023-04-20 18:44:40 +02:00
Robert Schulze
809a7fbb7a
Incorporate more review feedback 2023-04-05 19:43:30 +00:00
Anton Popov
1a6cdb3a6f fix fuzzer 2023-03-31 02:20:17 +00:00
Anton Popov
4912de441a add tests and documentation 2023-03-30 18:27:56 +00:00
Anton Popov
5a2587af87 fix cast from Map to named Tuple 2023-03-30 15:54:25 +00:00
Robert Schulze
f8980c582e
CMake: More removal of gold linker (follow-up to #47660)
+ fix a linker warning
2023-03-17 11:01:46 +00:00
Joanna Hulboj
e1f345cc6b Improve behaviour of conversion into Date for boundary value 65535 - with fixed tests 2023-02-04 18:47:42 +00:00
Antonio Andelic
cb0e338d70
Revert "Improve behaviour of conversion into Date for boundary value 65535" 2023-02-03 12:10:39 +01:00
Alexey Milovidov
0ba246ca53
Merge pull request #45914 from jh0x/improve-into-date-from-uint16
Improve behaviour of conversion into Date for boundary value 65535
2023-02-02 18:54:53 +03:00
Joanna Hulboj
e57492c214 Improve behaviour of conversion into Date for boundary value 65535 2023-02-01 18:22:06 +00:00
Yakov Olkhovskiy
f4ef21cb2f allow implicit narrowing conversion UInt64 => IPv4 2023-01-31 19:04:21 +00:00
Alexander Tokmakov
3f6594f4c6 forbid old ctor of Exception 2023-01-23 22:18:05 +01:00
Alexander Tokmakov
70d1adfe4b
Better formatting for exception messages (#45449)
* save format string for NetException

* format exceptions

* format exceptions 2

* format exceptions 3

* format exceptions 4

* format exceptions 5

* format exceptions 6

* fix

* format exceptions 7

* format exceptions 8

* Update MergeTreeIndexGin.cpp

* Update AggregateFunctionMap.cpp

* Update AggregateFunctionMap.cpp

* fix
2023-01-24 00:13:58 +03:00
Alexander Tokmakov
ec5d7d0a3a
Update src/Functions/FunctionsConversion.h
Co-authored-by: Alexander Gololobov <440544+davenger@users.noreply.github.com>
2023-01-20 17:33:01 +03:00
Alexander Tokmakov
72e8615bec formatting of some exception messages 2023-01-17 20:03:56 +01:00
Yakov Olkhovskiy
7a5a36cbed
Merge branch 'master' into refactoring-ip-types 2023-01-04 11:11:06 -05:00
Alexey Milovidov
fcefaa602f Fix error 2023-01-03 01:24:56 +01:00
Alexey Milovidov
fa16abe05e Fix error 2023-01-03 01:23:57 +01:00
Alexey Milovidov
e855d3519a
Merge branch 'master' into refactoring-ip-types 2023-01-02 21:58:53 +03:00
Alexey Milovidov
d95aca1b32 Fix fuzzer 2023-01-02 01:51:50 +01:00
Alexey Milovidov
e20eb570c5 Fix bad cast in monotonicity analysis 2023-01-01 20:42:15 +01:00
Yakov Olkhovskiy
0641066183
Merge branch 'master' into refactoring-ip-types 2022-12-08 11:12:05 -05:00
Robert Schulze
4abc36774e
Some cleanup of isDeterministic(InScopeOfQuery)()
In cases where the implementation simply repeates the implementation
inherited from the base class, it can be omitted.
2022-12-07 14:34:31 +00:00
Nikolay Degterinsky
e6e6afe8f7
Merge pull request #43731 from amosbird/issue_43622
Fix issue #43622
2022-11-29 02:49:38 +01:00
Yakov Olkhovskiy
4d7d9cbd0b some comments and beautification 2022-11-29 01:07:25 +00:00
Yakov Olkhovskiy
770b520ded
Merge branch 'master' into refactoring-ip-types 2022-11-28 08:50:19 -05:00
Amos Bird
65ce5abb63
Fix suspicious lowcard key 2022-11-27 18:40:26 +08:00
Yakov Olkhovskiy
19a01b77eb refactoring on settings for casting, dirty hack for inaccessable context in cast function (will require review), docs appended 2022-11-25 15:57:49 +00:00
Yakov Olkhovskiy
08456a2421 special treatment for FixedString(16) as a binary representation for IPv6 in casting to better match previous behavior, some cleanup, test fixed 2022-11-24 05:00:28 +00:00
Nikita Taranov
dc9be92733 impl 2022-11-23 23:08:14 +01:00
Yakov Olkhovskiy
988b030bfd bug fix, refactoring IPv6 to struct with overridden comparison 2022-11-22 12:57:19 +00:00
Yakov Olkhovskiy
ee3ce9de70 bugs fixed, some optimization, cleanup, test fixed 2022-11-21 07:45:42 +00:00
Yakov Olkhovskiy
dbaeabcf38 fixed some bugs, some functions corrected, some tests corrected 2022-11-18 20:10:27 +00:00
Yakov Olkhovskiy
9aeebf3bdf
Merge branch 'master' into refactoring-ip-types 2022-11-14 09:21:54 -05:00
Yakov Olkhovskiy
4d144be39c replace domain IP types (IPv4, IPv6) with native 2022-11-14 14:17:17 +00:00
Alexander Gololobov
661c5cd0ae
fixed type 2022-11-12 23:58:09 +01:00
Joanna Hulboj
42de468665 Fixed unexpected behaviour of Interval types with subquery and casting 2022-11-12 19:47:06 +00:00
Anton Popov
2ae3cfa9e0
Merge branch 'master' into dynamic-columns-14 2022-10-31 16:15:19 +01:00
Nikolai Kochetov
db422fa903
Merge pull request #42410 from ClickHouse/fix-multi-arg-monotonicity
Fix possible LOGICAL_ERROR in binary ariphmetics monotonicity.
2022-10-26 14:11:23 +02:00
Azat Khuzhin
bcc8d9f9d9 Merge remote-tracking branch 'upstream/master' into build/shorten-64-to-32
* upstream/master:
  Fix strange code in date monotonicity
  Add a test
  Fix error
  Add tests
  Remove trash
2022-10-23 07:45:10 +02:00
Alexey Milovidov
7bf1f4cdfa Fix strange code in date monotonicity 2022-10-22 09:02:20 +02:00
Azat Khuzhin
4eeb7337ed Merge remote-tracking branch 'upstream/master' into build/shorten-64-to-32
Conflicts:
- src/Common/intExp.h
- src/Functions/DateTimeTransforms.h
- src/Functions/FunctionsConversion.h
2022-10-21 22:51:56 +02:00
Azat Khuzhin
4e76629aaf Fixes for -Wshorten-64-to-32
- lots of static_cast
- add safe_cast
- types adjustments
  - config
  - IStorage::read/watch
  - ...
- some TODO's (to convert types in future)

P.S. That was quite a journey...

v2: fixes after rebase
v3: fix conflicts after #42308 merged
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-10-21 13:25:19 +02:00
Nikolai Kochetov
0df9d2f5cc Fix tests. 2022-10-20 13:41:27 +00:00
Nikolai Kochetov
58b6194a2d Fix another one case. 2022-10-19 15:08:00 +00:00
Alexey Milovidov
d1f0c80ffe Revert "Merge pull request #40217 from zvonand/zvonand-minmax"
This reverts commit df934d8762, reversing
changes made to d3a7945b1b.
2022-10-17 04:57:15 +02:00
Alexander Tokmakov
4175f8cde6 abort instead of __builtin_unreachable in debug builds 2022-10-07 21:49:08 +02:00
Robert Schulze
385be7f528
Fix tests 2022-10-03 18:05:16 +00:00
Robert Schulze
ff2cbff4a1
Check boundaries similar to integer handling 2022-10-03 15:50:26 +00:00
Robert Schulze
123afbca80
Fix toDateTime64() for negative floats
Resolves #41686
2022-10-03 13:33:12 +00:00
Anton Popov
6e61cf92f5 Merge remote-tracking branch 'upstream/master' into HEAD 2022-10-03 13:16:57 +00:00
Alexey Milovidov
45afacdae4
Merge pull request #41186 from ClickHouse/fix-three-fourth-of-trash
Fix more than half of the trash
2022-09-22 07:28:26 +03:00
Duc Canh Le
e2bd478b98 fix conversion from nullable fixed string to string 2022-09-20 10:05:18 +08:00
Alexey Milovidov
000b6ac81c Fix error 2022-09-19 09:30:48 +02:00
Alexey Milovidov
ab4db2d0c4 Fix 5/6 of trash 2022-09-19 08:50:53 +02:00
Denny Crane
6540d55d42
Merge branch 'master' into test/zvonand-monotonic 2022-09-16 17:02:09 -03:00
Anton Popov
f0a404e2c8 Merge remote-tracking branch 'upstream/master' into HEAD 2022-09-06 15:51:16 +00:00