Commit Graph

3744 Commits

Author SHA1 Message Date
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
Arthur Passos
e9b124b4bc Don't use default implementation for LC columns in Scalar functions 2022-08-02 09:17:53 -03:00
Anton Popov
f94d4d4877
Merge branch 'master' into hash-functions-map 2022-08-02 13:26:54 +02:00
Robert Schulze
bf574b9154
Merge pull request #39760 from ClickHouse/bit-fiddling
Use std::popcount, ::countl_zero, ::countr_zero functions
2022-08-01 17:04:51 +02:00
Kruglov Pavel
dfdfabec94
Merge pull request #39218 from evillique/file_default_value
Add default argument to the function `file`
2022-08-01 13:04:19 +02:00
Robert Schulze
a7734672b9
Use std::popcount, ::countl_zero, ::countr_zero functions
- Introduced with the C++20 <bit> header

- The problem with __builtin_c(l|t)z() is that 0 as input has an
  undefined result (*) and the code did not always check. The std::
  versions do not have this issue.

- In some cases, we continue to use buildin_c(l|t)z(), (e.g. in
  src/Common/BitHelpers.h) because the std:: versions only accept
  unsigned inputs (and they also check that) and the casting would be
  ugly.

(*) https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html
2022-07-31 15:16:51 +00:00
Robert Schulze
4d7627e45e
Fix include 2022-07-31 07:36:40 +00:00
Robert Schulze
8ca236de08
Enable SQL function getOSKernelVersion() on all platforms
Follow up to PR #38615
2022-07-30 22:36:47 +00:00
Robert Schulze
85773e0926
Merge pull request #38615 from liyinsg/simplified_function_registration_interface
Simplified function registration interface
2022-07-31 00:18:37 +02:00
Robert Schulze
b52843d5fd
Merge pull request #37951 from zvonand/dt64_timeslots
Fix timeSlots for DateTime64
2022-07-30 20:49:05 +02:00
Alexey Milovidov
8f348edbbd
Merge pull request #39000 from ClickHouse/avx-enablement
Avx enablement
2022-07-30 04:51:07 +03:00
Arthur Passos
f0f19874da fix style 2022-07-29 13:56:01 -03:00
Arthur Passos
59fbd21024 Unwrap LC column in IExecutablefunction::executeWithoutSparseColumns 2022-07-29 12:03:09 -03:00
zvonand
b390bcfe7c fix wrong data type cast 2022-07-29 13:25:40 +03:00
Li Yin
4088c0a7f3 Automated function registration
Automated register all functions with below naming convention by
iterating through the symbols:
void DB::registerXXX(DB::FunctionFactory &)
2022-07-29 15:39:50 +08:00
Anton Popov
45da56d802 support hash functions with Map type 2022-07-28 19:15:19 +00:00
Alexander Gololobov
9525bd19bf
Merge pull request #39592 from ClickHouse/fix-wrong-regexp-replace
Fix wrong regexp replace
2022-07-27 09:54:28 +02:00
Antonio Andelic
904a05ac21
Merge pull request #39496 from azat/custom-tld-exclamation-asterisk
Add support of !/* (exclamation/asterisk) in custom TLDs
2022-07-27 08:55:49 +02:00
Vladimir C
d9e8e9b948
Merge pull request #39552 from filimonov/maxsplit-bug
Fix bug with maxsplit in the splitByChar
2022-07-26 11:14:27 +02:00
Alexey Milovidov
833b24b486 Fix the wrong REGEXP_REPLACE alias 2022-07-26 08:01:49 +02:00
Azat Khuzhin
1d4a7c7290 Add support of !/* (exclamation/asterisk) in custom TLDs
Public suffix list may contain special characters (you may find format
here - [1]):
- asterisk (*)
- exclamation mark (!)

  [1]: https://github.com/publicsuffix/list/wiki/Format

It is easier to describe how it should be interpreted with an examples.

Consider the following part of the list:

    *.sch.uk
    *.kawasaki.jp
    !city.kawasaki.jp

And here are the results for `cutToFirstSignificantSubdomainCustom()`:

If you have only asterisk (*):

    foo.something.sheffield.sch.uk -> something.sheffield.sch.uk
    sheffield.sch.uk               -> sheffield.sch.uk

If you have exclamation mark (!) too:

    foo.kawasaki.jp                -> foo.kawasaki.jp
    foo.foo.kawasaki.jp            -> foo.foo.kawasaki.jp
    city.kawasaki.jp               -> city.kawasaki.jp
    some.city.kawasaki.jp          -> city.kawasaki.jp

TLDs had been verified wit the following script [2], to match with
python publicsuffix2 module.

  [2]: https://gist.github.com/azat/c1a7a9f1e3519793134ef4b1df5461a6

v2: fix StringHashTable padding requirements
Fixes: #39468
Follow-up for: #17748
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2022-07-26 08:34:30 +03:00
Alexander Gololobov
dbcb7e5f1e Fix for empty function name on FreeBSD build 2022-07-25 13:11:36 +02:00
Mikhail Filimonov
33ee858d18
Fix bug with maxsplit in the splitByChar 2022-07-25 13:11:02 +02:00
Alexey Milovidov
6fdcb009ff
Merge pull request #39533 from ClickHouse/now-in-block
Add function `nowInBlock`
2022-07-25 04:22:11 +03:00
Alexey Milovidov
cff712970e Add function nowInBlock 2022-07-24 19:58:48 +02:00
Robert Schulze
c788e05c77
Merge pull request #39292 from zvonand/zvonand-b58-datatype
Simplify Base58 encoding/decoding
2022-07-24 18:09:40 +02:00
Kruglov Pavel
f79924f270
Merge branch 'master' into file_default_value 2022-07-22 21:17:37 +02:00
Robert Schulze
6a631426b7
Disable vectorization for uint64 --> float32 cast 2022-07-22 12:49:16 +00:00
Robert Schulze
cad0e7a62c
Move hot loop inside nested if/else statements
- required to control the vectorization of a specific cast which
  annotates the loop using pragmas
2022-07-22 11:53:23 +00:00
Alexander Tokmakov
bed2206ae9
Merge pull request #39460 from ClickHouse/remove_some_dead_and_commented_code
Remove some dead and commented code
2022-07-22 13:24:34 +03:00
Robert Schulze
ea0a3bf600
Merge branch 'master' into stringref-to-string_view 2022-07-21 18:33:06 +02:00
Kruglov Pavel
f4f05ec786
Merge pull request #39447 from Avogar/better-parse-time-delta
Extend time units in parseTimeDelta function
2022-07-21 17:39:40 +02:00
Andrey Zvonov
e473606cd1
Merge branch 'master' into zvonand-b58-datatype 2022-07-21 15:55:05 +02:00
Alexander Tokmakov
a8da5d96fc remove some dead and commented code 2022-07-21 15:05:48 +02:00
avogar
d63786e709 Better 2022-07-21 09:07:23 +00:00
avogar
49d980d16c Extend time units in parseTimeDelta function 2022-07-21 08:55:51 +00:00
lokax
22792d1c6a fix style
Signed-off-by: lokax <m632656684@gmail.com>
2022-07-20 21:20:00 +08:00
lokax
140f5e6685 recursive check array offsets
Signed-off-by: lokax <m632656684@gmail.com>
2022-07-20 21:20:00 +08:00
lokax
d40f04b860 fix function name
Signed-off-by: lokax <m632656684@gmail.com>
2022-07-20 21:20:00 +08:00
lokax
ff433c1c01 fix build
Signed-off-by: lokax <m632656684@gmail.com>
2022-07-20 21:20:00 +08:00
lokax
647eafa00e support for array type 2022-07-20 21:20:00 +08:00
lokax
5c6b18a9bd fix: 3rd parameter must be constant 2022-07-20 21:20:00 +08:00
lokax
6e23d2cb85 feat(function): tupleElement with default value 2022-07-20 21:20:00 +08:00
Nikolay Degterinsky
c9ae525da7
Merge branch 'master' into file_default_value 2022-07-20 14:22:58 +02:00
zvonand
11b8d788ca small improvements 2022-07-20 13:36:47 +02:00
zvonand
592499e290 fix server crash on negative size 2022-07-19 23:11:03 +02:00
Robert Schulze
9d0e3d107b
Update src/Functions/formatReadableTimeDelta.cpp
Co-authored-by: Nikolay Degterinsky <43110995+evillique@users.noreply.github.com>
2022-07-19 13:17:33 +02:00
alesapin
bdc09c8319
Merge pull request #39303 from ClickHouse/whitespaces
Whitespaces
2022-07-19 13:17:29 +02:00
Kruglov Pavel
12221cffc9
Merge pull request #39071 from jiahui-97/parse_timedelta
implementation of parseTimeDelta function
2022-07-19 12:39:56 +02:00
zvonand
d245d6349a fixed zero check 2022-07-19 12:08:08 +02:00