Commit Graph

3908 Commits

Author SHA1 Message Date
Roman Vasin
e1833d3cd6 Merge branch 'master' into ADQM-528-B 2022-09-02 10:40:44 +00:00
Antonio Andelic
e64436fef3 Fix typos with new codespell 2022-09-02 08:54:48 +00:00
Fangyuan Deng
bc7d661668
Merge branch 'master' into UniqSketch 2022-09-01 19:31:53 +08:00
pzhdfy
acec516271 add docs 2022-09-01 19:31:01 +08:00
Fangyuan Deng
5c2f35c302
Merge branch 'master' into UniqSketch 2022-08-31 10:23:46 +08:00
Dmitry Novik
003483b616 Add compatibility setting 2022-08-30 20:49:40 +02:00
Cory Levy
cd371110ad Fix timezone offset formatting 2022-08-29 21:01:27 -04:00
Dmitry Novik
d32492ce8a Fix GROUPING function SQL compatibility 2022-08-29 18:26:56 +02:00
Cory Levy
d0ace9a8fb Add the %z format descriptor to formatDateTime 2022-08-28 22:28:11 -04:00
Alexey Milovidov
00074a5e14
Merge pull request #40711 from ClickHouse/all_new_functions_must_be_documented
All new functions must be documented
2022-08-28 17:05:05 +03:00
Robert Schulze
df934d8762
Merge pull request #40217 from zvonand/zvonand-minmax
Fix conversion Date32 / DateTime64 / Date to narrow types
2022-08-28 09:42:39 +02:00
Alexey Milovidov
1ff535a128 One step back 2022-08-28 02:00:09 +02:00
Alexey Milovidov
8a4bacc4b7 Update example 2022-08-28 00:30:14 +02:00
Alexey Milovidov
6ac9eabbd4 Register more aliases correctly 2022-08-28 00:17:13 +02:00
Alexey Milovidov
a6d99e795e Register more aliases correctly 2022-08-28 00:14:38 +02:00
Alexey Milovidov
e266688576 Remove something stupid 2022-08-27 23:58:34 +02:00
Alexey Milovidov
421d28542b Register all function aliases correctly 2022-08-27 23:53:51 +02:00
Alexey Milovidov
6139cc8f7a Add Documentation to FunctionFactory 2022-08-27 22:06:57 +02:00
Alexey Milovidov
53343e0fc2 Remove accurate_Cast and accurate_CastOrNull, which are unused 2022-08-26 21:27:30 +02:00
Kruglov Pavel
e2e1ca26e9
Merge pull request #40628 from Avogar/fix-to-fixed-string
Fix short circuit execution of toFixedString function
2022-08-26 12:26:16 +02:00
Robert Schulze
1c8c83ccf3
Merge pull request #40620 from zvonand/zvonand-b58
Base58 fix handling leading 0 / '1'
2022-08-26 10:18:26 +02:00
Alexey Milovidov
fcba079baa
Merge pull request #40572 from Avogar/fix-map-bug
Fix possible logical error in arrayElement function with Map
2022-08-25 20:17:22 +03:00
avogar
1844873dbc Fix short circuit execution of toFixedString function 2022-08-25 16:15:22 +02:00
Roman Vasin
5f33ed711b Add checkArguments() to IFunctionDateOrDateTime; Move name and getName() to IFunctionDateOrDateTime and IFunctionCustomWeek.h 2022-08-25 12:38:28 +00:00
zvonand
b3360c169d Fix handling zeros/'1's at the beginning of input 2022-08-25 15:35:39 +03:00
zvonand
23357350d3 Merge branch 'master' of github.com:ClickHouse/ClickHouse into zvonand-minmax 2022-08-25 15:32:04 +03:00
pzhdfy
e85e885d40 add blank line 2022-08-25 18:15:01 +08:00
zvonand
24dfa0c64a tryfix darwin 2022-08-25 12:28:15 +03:00
Kruglov Pavel
25d7d05148
Merge pull request #40567 from ClickHouse/Avogar-patch-1
Better exception messages in FunctionArrayMapped
2022-08-25 11:14:06 +02:00
Roman Vasin
bff61d1081 Add tests for toStartOfWeek(), fix executeImpl for Date32 2022-08-25 08:54:26 +00:00
Roman Vasin
4394929085 Add checkArguments() to IFunctionCustomWeek 2022-08-25 08:30:23 +00:00
Roman Vasin
1285abc195 Add IFunctionCustomWeek and FunctionCustomWeekToDateOrDate32 2022-08-25 08:11:21 +00:00
zvonand
3797e7cfbe Merge branch 'master' of github.com:ClickHouse/ClickHouse into zvonand-minmax 2022-08-25 01:57:49 +03:00
zvonand
a61fd73c88 fix test fails 2022-08-25 00:26:44 +03:00
zvonand
5c00428940 updated as was before 2022-08-24 19:46:17 +03:00
Roman Vasin
01dc483b64 Add IFunctionDateOrDateTime 2022-08-24 15:44:53 +00:00
Alexander Gololobov
c9177d2cb3
Merge pull request #40475 from ClickHouse/allow-conversion-from-string-datetime64-to-date-date32
Allow conversion from String with DateTime64 to Date and Date32
2022-08-24 17:33:20 +02:00
zvonand
b4564099f9 fix inherited parts 2022-08-24 17:07:30 +03:00
avogar
fa320f65f6 Fix possible logical error in arrayElement function with Map 2022-08-24 11:01:39 +00:00
Kruglov Pavel
860d0baa48
Better exception messages in FunctionArrayMapped 2022-08-24 12:28:44 +02:00
zvonand
e257f9d0cd update docs, tests + small fixes 2022-08-24 01:09:14 +03:00
Roman Vasin
423a4f22cc Fix toStartOfYear, toStartOfISOYear, toStartOfQuarter and toStartOfMonth to return Date32 2022-08-23 16:55:53 +00:00
Roman Vasin
505a8ad0e0 Fix toMonday() function to return Date32 2022-08-23 15:39:21 +00:00
zvonand
42f86442ab updated tests + toStartOfWeek 2022-08-23 18:33:09 +03:00
Andrey Zvonov
52159b77d0
Merge branch 'master' into zvonand-minmax 2022-08-23 17:18:57 +03:00
zvonand
6abe09a725 updated tests + teStartOfWeek 2022-08-23 17:13:39 +03:00
Roman Vasin
e40b8f471d Add compatibility parameter enable_date32_results 2022-08-23 12:43:08 +00:00
pzhdfy
d81462c095 check all ArgumentsDataTypes and use equals 2022-08-23 15:08:35 +08:00
Robert Schulze
ec9ef741fc
Merge branch 'master' into less-string-ref 2022-08-22 20:48:16 +02:00
Roman Vasin
d73a80a54c Delete not needed code from getReturnTypeImpl of FunctionDateOrDateTimeToDateOrDate32 2022-08-22 16:24:45 +00:00
zvonand
d789dabc9d Fixed , updated docs 2022-08-22 17:36:56 +03:00
zvonand
e5b4fb4191 fix some issues 2022-08-22 17:36:56 +03:00
zvonand
a7a1269e60 updated tests + improve logic 2022-08-22 17:36:55 +03:00
zvonand
537fb8c4ee fix 1 2022-08-22 17:36:55 +03:00
Alexey Milovidov
a3e4753d83
Merge pull request #40466 from ClickHouse/remove-some-trash
Remove some trash
2022-08-22 15:59:50 +03:00
Alexey Milovidov
c4a60b8123 Allow conversion from String with DateTime64 to Date and Date32 2022-08-22 00:23:10 +02:00
Alexey Milovidov
996aa2d126 Remove some trash 2022-08-21 20:46:33 +02:00
Alexey Milovidov
8dd5c215e0
Merge pull request #40462 from ClickHouse/revert-39000-avx-enablement
Revert "Avx enablement"
2022-08-21 21:32:45 +03:00
Robert Schulze
4caf2c4c33
Reduce some usage of StringRef
See #39535 and #39300
2022-08-21 18:10:32 +00:00
Robert Schulze
3aa5acdb35
Merge pull request #40391 from ClickHouse/reduce-StringRef
Reduce some usage of StringRef
2022-08-21 20:04:57 +02:00
Alexey Milovidov
6fbff6d1f6
Revert "Avx enablement" 2022-08-21 15:47:02 +03:00
Robert Schulze
77e64935e1
Reduce some usage of StringRef 2022-08-19 09:56:59 +00:00
Robert Schulze
24615059fb
Merge pull request #40319 from ClickHouse/custom-error-code-in-throwif
Allow custom error code in throwIf
2022-08-19 09:49:35 +02:00
Robert Schulze
5037ce547f
Only allow 8/16/32-bit signed integers as custom error code data type
The internally used data type for error code is "int", and by
disallowing unsigned integers or integers >= 64 bit we avoid truncation
issues.
2022-08-18 15:16:08 +00:00
Robert Schulze
d6e5a6b7e7
fix: prevent possible race between getReturnTypeImpl() and executeImpl()
I don't know if the context (in detail: the config settings) can change
between calls to getReturnTypeImpl() and executeImpl() but we better
don't find out. Instead, read setting "allow_custom_error_code_in_throwif"
just just once in the ctor of FunctionThrowIf.
2022-08-18 12:24:42 +00:00
Robert Schulze
baae7726a7
style: "Fix" style check in CI 2022-08-18 10:13:58 +00:00
Robert Schulze
f121941916
feat: allow custom error code for SQL function throwIf() 2022-08-17 21:14:40 +00:00
Robert Schulze
164fc3d296
style: improve code aesthetics 2022-08-17 20:39:37 +00:00
Roman Vasin
19cb6d87c8 Add FunctionDateOrDateTimeToDateOrDate32 and make toLastDayOfMonth working 2022-08-17 16:38:06 +00:00
Roman Vasin
be3151937c Set return type to Date32 for toLastDayOfMonth function 2022-08-17 08:51:14 +00:00
pzhdfy
48fcf6580d Merge branch 'UniqSketch' of github.com:pzhdfy/ClickHouse into UniqSketch 2022-08-17 11:26:44 +08:00
pzhdfy
172b5025e2 use camelCase aNotB 2022-08-17 11:24:19 +08:00
Robert Schulze
df889351ad
feat: replace unbounded vectorscan cache by bounded cache
VectorScan patterns can grow large (up to multiple MBs) and queries
involving different VectorScan patterns lead to an ever increasing
pattern cache size.

With this commit, the unbounded cache for vectorscan patterns is
replaced by a bounded cache with "CacheTable" eviction strategy, similar
to what we have for re2 patterns. The cache size is currently hard-coded
to 500 entries.

Fixes #19869
2022-08-16 21:09:47 +00:00
Robert Schulze
89bf69c35f
style: improve code aesthetics and make it slightly safer 2022-08-16 21:09:32 +00:00
Igor Nikonov
e7baf920a9
Merge pull request #39600 from zvonand/zvonand-decimal-overflow
Check Decimal division overflow based on operands scale
2022-08-15 15:03:06 +02:00
Alexey Milovidov
ad936ae32a
Merge pull request #40211 from canhld94/ch_canh_fix_datetime
Fix unexpected result arrayDifference of Array(UInt32)
2022-08-15 04:52:58 +03:00
Igor Nikonov
6f00643bc1
Merge branch 'master' into zvonand-decimal-overflow 2022-08-15 02:38:45 +02:00
Igor Nikonov
2cb78c7220 Detailed comment about overflow check 2022-08-15 00:37:18 +00:00
Duc Canh Le
272447c5dc remove junk log 2022-08-14 16:19:09 +08:00
Duc Canh Le
71dd2a19fc fix arrayDiff 2022-08-14 16:14:13 +08:00
Alexey Milovidov
10022ee974 Fix insufficient argument check for encryption functions 2022-08-14 04:28:30 +02:00
Alexey Milovidov
31dbb68185 Fix array signed const positive subscript operator 2022-08-13 08:04:24 +02:00
Kseniia Sumarokova
a6cfc7bc3b
Merge pull request #34651 from alexX512/master
New caching strategies
2022-08-12 17:23:37 +02:00
Kruglov Pavel
456291f335
Fix style 2022-08-11 13:08:56 +02:00
Igor Nikonov
394a71dcfd More correct fix + tests 2022-08-11 06:24:40 +00:00
Alexey Milovidov
8374f31306
Merge pull request #39425 from arenadata/ADQM-485
Add support of dates from year 1900 to 2299 for Date32 and DateTime64
2022-08-11 05:01:53 +03:00
Nikolay Degterinsky
547662f88b
Merge pull request #40002 from Algunenano/fix_hashid
Fix hashId crash and salt parameter not being used
2022-08-11 02:25:10 +02:00
Alexey Milovidov
53097b3d65
Merge pull request #40015 from tbragin/master
Add parseDateTime64BestEffortUS* functions
2022-08-10 20:00:50 +03:00
Roman Vasin
537ba613dc Remove clamping from AddDaysImpl and AddWeeksImpl; fix 01921_datatype_date32 test 2022-08-10 08:14:16 +00:00
Kruglov Pavel
4bbe5186c2
Merge pull request #39999 from HeenaBansal2009/Support_H_syntax_in_Hour_Interval_Kind
Added H literal for Hour IntervalKind
2022-08-09 11:24:41 +02:00
Roman Vasin
96598e3574 Replace normalizeDayNum() by std::clamp() 2022-08-09 08:52:02 +00:00
Tanya Bragin
eb61db3b67 initial changes to close #37492 2022-08-08 19:45:00 -07:00
HeenaBansal2009
d2bdf6fc3e Added tests 2022-08-08 11:51:05 -07:00
Raúl Marín
c8f8ceea8d Fix hashId crash and salt not applying 2022-08-08 18:25:34 +02:00
alexX512
6bf29cb610 Change class LRUCache to class CachBase. Check running CacheBase with default pcahce policy SLRU 2022-08-07 19:59:30 +00:00
pzhdfy
2d5446a86b add FunctionsUniqTheta 2022-08-05 14:11:52 +08:00
Nikolai Kochetov
658a269d56
Merge branch 'master' into use-dag-in-key-condition 2022-08-04 16:18:40 +02:00
Kruglov Pavel
b84e65bb3b
Merge pull request #39716 from arthurpassos/fix_scalar_cte_with_lc_result
Unwrap LC column in IExecutablefunction::executeWithoutSparseColumns
2022-08-03 18:53:37 +02:00
zvonand
99a458c12d small fix 2022-08-03 16:36:36 +03:00
Arthur Passos
e9b124b4bc Don't use default implementation for LC columns in Scalar functions 2022-08-02 09:17:53 -03:00