Commit Graph

527 Commits

Author SHA1 Message Date
Maksim Kita
a2560cecf4
Merge branch 'master' into fuse 2021-02-09 18:30:18 +03:00
Russ Frank
2cde36a155 dont allow col type to be decimal 2021-02-08 22:53:45 -05:00
Russ Frank
b297e0ef36 feedback: use references, dont support decimal, rearrange struct members 2021-02-08 22:51:03 -05:00
Russ Frank
746dc1ddae Merge remote-tracking branch 'origin/master' into rf/add-deltasum 2021-02-08 15:35:16 -05:00
lehasm
363aefb42e
DOCSUP-3908: mannWitneyUTest, welchTTest and studentTTest documentation (#19784)
* studentTTest function description

* welchttest description, links in studentttest

* mannWhitneyUTest description

* Text changed slightly

* Text changed slightly

* Text changed slightly

* Text changed slightly

* - First header is first level.
- sample_index type set to UInt64.
- Return values renamed.

- mannWhitneyUTest:
  - added continuity_correction parameter
  - optional parameters wrapped in braces [ ]
  - description refactored
  - example SQL placed on single line

* Improved formulations (hopefully)
General data type names used (Integer, Float, Decimal)
Removed names from return values

* Fixes

* Optional parameters stated explicitly

* New line at the end of files

* Russian function description

* Files moved in the right folder

* Translated 'Original article' to russian

* Typos are fixed

* fixed alowed parameter value: "two sided" -> "two-sided"
* duplicate word "require" is removed from exception messages

* mannWhitneyUTest description changed
Added Tuple link in return values
"samples from two populations" added in short descriptions

* Russian translation updated

* fix

Co-authored-by: Alexey Smirnov <alexey-sm@yandex-team.ru>
2021-02-08 15:58:27 +03:00
tavplubix
2daa403201
Update AggregateFunctionGroupArrayMoving.h 2021-02-08 14:59:51 +03:00
Amos Bird
1b32292dd0
bitmap function for all native integers 2021-02-07 11:32:54 +08:00
Russ Frank
2f31eabc13 turn off ubsan for deltasum functions 2021-02-04 21:22:05 -05:00
Russ Frank
bcf5a70e4f check arg type 2021-02-04 14:28:45 -05:00
Russ Frank
2bfeef23cf correct merge logic 2021-02-04 11:55:19 -05:00
Alexey Milovidov
15a529f6f7 Whitespace 2021-02-04 10:35:49 +03:00
Russ Frank
f47ea31ef1 clang-format 2021-02-04 00:26:23 -05:00
Russ Frank
75ab05f80a correct conditional 2021-02-04 00:19:24 -05:00
Russ Frank
b36d20ef6e record seen first and last 2021-02-04 00:11:43 -05:00
Russ Frank
3913f39211 Add deltaSum aggregate function, docs & test 2021-02-03 22:49:28 -05:00
Azat Khuzhin
984445b44b Fix UBsan reports in quantileTiming
UBsan reports [1]:

    ../src/AggregateFunctions/QuantileTiming.h:442:27: runtime error: 1.84467e+19 is outside the range of representable values of type 'unsigned long' Received signal -3 Received signal Unknown signal (-3)

  [1]: https://clickhouse-test-reports.s3.yandex.net/19971/e15f5d9cb5b36482d1ae9ca069074fb200f2ab37/fuzzer_ubsan/report.html#fail1

Follow-up for: #19394
2021-02-04 02:01:48 +03:00
Alexey Milovidov
349d783089 Improve performance of aggregate functions 2021-02-01 20:12:12 +03:00
Amos Bird
c39ee3f58c
Fix argMinMaxIf crash 2021-01-31 16:27:46 +08:00
kssenii
9c7881f4c9 Fix 2021-01-28 10:30:54 +00:00
Maksim Kita
a3d6888c5b RoaringBitmapWithSmallSet rb_andnot fix 2021-01-27 18:01:08 +03:00
alexey-milovidov
ba3e064a63
Merge pull request #19371 from kssenii/test-coverage-with-factories
test coverage with factories
2021-01-25 07:11:09 +03:00
alexey-milovidov
77af612bc5
Merge pull request #19466 from azat/UBsan-report-fixes
UBsan report fixes (arraySlice, addMinutes/addHours/addWeeks/addDays, sumWithOverflow(Decimal))
2021-01-24 22:27:15 +03:00
Azat Khuzhin
df53438a66 Fix UBsan report in sumWithOverflow(Decimal)
https://clickhouse-test-reports.s3.yandex.net/19450/3fffa16aab8f5342926b3a6b1e3c6a14208e3322/fuzzer_ubsan/report.html#fail1
2021-01-24 09:26:07 +03:00
kssenii
0d940c6137 Add AggregateFunctionCombinatorFactory, better names 2021-01-23 12:07:37 +00:00
Alexey Milovidov
02d28c1f9b Fix UBSan report in avgWeighted 2021-01-23 03:17:58 +03:00
tavplubix
9801bfc0ee
Merge branch 'master' into fix_18063 2021-01-22 17:28:05 +03:00
alexey-milovidov
f44f169aaa
Merge pull request #19385 from ClickHouse/sum-ubsan
Avoid UBSan report in aggregate function sum
2021-01-22 17:25:55 +03:00
alexey-milovidov
9add38f47b
Merge pull request #19394 from ClickHouse/quantile-weighted-overflow
Fix UBSan report in quantileExactWeighted
2021-01-22 17:18:01 +03:00
kssenii
6dc32ae4cb More correct for functions and aggr. functions 2021-01-22 11:58:29 +00:00
Alexey Milovidov
14adc2d5f0 Fix UBSan report in quantileExactWeighted 2021-01-22 03:05:45 +03:00
Alexey Milovidov
056b44b64f Add a test 2021-01-22 01:49:37 +03:00
Alexey Milovidov
960d149e0b More annotations 2021-01-22 01:05:04 +03:00
kssenii
daab2c91bb Better 2021-01-21 21:15:11 +00:00
kssenii
1ec463b61f Fast test fix 2021-01-21 20:02:44 +00:00
Alexey Milovidov
d9cb1c1bdd Avoid UBSan report in aggregate function sum 2021-01-21 22:52:00 +03:00
Ildus Kurbangaliev
86db47de27 fix assert call 2021-01-21 22:23:49 +05:00
kssenii
c1702f34ee Add factories info into system.query_log 2021-01-21 15:46:37 +00:00
Ildus Kurbangaliev
47a0f4e162 Add tuple argument support for argMin and argMax 2021-01-21 16:47:51 +05:00
Alexander Tokmakov
6560ec3ed5 fix segfault on aggregation when MV has unexpected structure 2021-01-20 19:36:18 +03:00
Alexey Milovidov
c5ac0762e4 Speed up aggregate function sum 2021-01-17 21:59:31 +03:00
alexey-milovidov
2c8ce7d94e
Merge pull request #19019 from ClickHouse/group-uniq-array-enum
Fix return type of groupUniqArray
2021-01-14 10:11:44 +03:00
Alexey Milovidov
d27e04997d More tests 2021-01-13 21:13:52 +03:00
sundy-li
e6351cf966 Add UInt64 Support for bitmapTransform/bitmapSubsetInRange/bitmapSubsetLimit 2021-01-12 17:13:43 +08:00
sundy-li
9aa7c7ef09 Fix same bug in another function 2021-01-11 11:35:56 +08:00
sundy-li
893efab7c3 Fix AggregateFunctionGroupBitmapData bitmapOrCardinality using wrong variable 2021-01-11 11:35:56 +08:00
HuFuwang
833054251b update sorted logic in AggregateFunctionWindowFunnelData::add 2021-01-10 11:31:44 +08:00
HuFuwang
21659e8aa5 Merge branch 'master' into feature/fix-windowFunnel-inconsistency 2021-01-10 07:34:05 +08:00
alexey-milovidov
fe1c153c6f
Merge pull request #18817 from ucasFL/wf
replace PODArray with PODArrayWithStackMemory in AggregateFunctionWindowFunnelData
2021-01-10 00:11:57 +03:00
HuFuwang
8e63328221 refine naming. 2021-01-09 23:13:03 +08:00
HuFuwang
dd52f88e54 fix the inconsistent result of windowFunnel in case of same timestamp for different events. 2021-01-09 22:37:49 +08:00
feng lv
7fce85f639 replace PODArray with stack PODArray 2021-01-07 06:32:33 +00:00
Azat Khuzhin
fdcfacda60 Fix *If combinator with Nullable types
sumIf(Nullable()) and similar unary functions (unary w/o If combinator)
was working incorrectly, since it returns "sum" from the getName()
helper, and so distributed query processing fails.

The problem is in the optimization in
AggregateFunctionIfNullUnary::add() for the unary functions. It pass
only one column to write result to, instead of all passed arguments +
result columns.
While AggregateFunctionIf::add() assumes that it accepts arguments  +
result columns, and use last column as a result.

Introduced-in: #16610
Fixes: #18210
2021-01-07 03:09:13 +03:00
Alexey Milovidov
a1ce6c4165 Fix errors 2021-01-05 04:26:29 +03:00
Alexey Milovidov
fbed8bb426 Fix fuzz errors in sumMap 2021-01-04 04:54:00 +03:00
Alexey Milovidov
cc0924454c Development 2021-01-04 04:02:47 +03:00
Alexey Milovidov
34126a635b sumMap: check for summable types 2021-01-04 04:02:46 +03:00
alexey-milovidov
aff724ea7d
PODArray: Avoid call to memcpy with (nullptr, 0) arguments (#18526)
* Avoid call to memcpy with nullptr, 0 arguments

* Add assert to PODArray

* Fix build

* Fix build

* Minor fixes for min/sim hash

* Fix build

* Fix build

* Fix build

* Fix error

* Fix "not actually an error"

* Fix build

* Fix build

* Fix build
2021-01-02 17:07:54 +03:00
alexey-milovidov
8b98465f10
Merge pull request #17043 from amosbird/countoptimization
Devirtualize -If and vectorize count
2020-12-31 03:34:16 +03:00
Amos Bird
a797ac6d80 fix test again... 2020-12-24 17:43:20 +03:00
Amos Bird
6648b89843 fix test 2020-12-24 17:43:20 +03:00
Amos Bird
e42f83ae72 small fix 2020-12-24 17:43:20 +03:00
Amos Bird
c19ce7dad3 rewrite with better code 2020-12-24 17:43:20 +03:00
Andy Yang
cc75c33064 modify code style 2020-12-24 17:43:20 +03:00
Andy Yang
ccb2fcc161 Support bitmap64 feature 2020-12-24 17:43:20 +03:00
Yatsishin Ilya
ce1e2b18a3 Fix codespell warnings. Split style checks. Update style checks docker 2020-12-24 13:17:52 +03:00
alexey-milovidov
4561527d4d
Merge pull request #18404 from amosbird/fixsimplestate
-SimpleState function arg type = return type
2020-12-24 12:12:29 +03:00
Amos Bird
2e0a2257b8
-SimpleState function arg type = return type 2020-12-23 21:09:05 +08:00
Amos Bird
12a36c0e9f
allow nested if (useless but also harmless) 2020-12-23 12:34:15 +08:00
Alexander Kuzmenkov
3f33e6b3e0 some review fixes 2020-12-22 20:46:31 +03:00
Amos Bird
effb404c7e
Better 2020-12-22 23:35:07 +08:00
Alexander Kuzmenkov
77b816caea cleanup 2020-12-22 02:47:14 +03:00
Amos Bird
47b177d175
Fix build 2020-12-21 13:51:11 +08:00
Amos Bird
282dd23587
Split minmaxany 2020-12-21 12:46:31 +08:00
Amos Bird
9348526078
Devirtualize -If and vectorize count 2020-12-21 11:35:38 +08:00
Kruglov Pavel
d82c23d5cf
Merge pull request #16853 from amosbird/ss
Add -SimpleState combinator
2020-12-17 14:00:05 +03:00
Alexander Tokmakov
6c8f844442 better exception message for unknown function 2020-12-17 00:42:14 +03:00
Maksim Kita
55f991adde Updated test 2020-12-14 15:23:53 +03:00
Amos Bird
c6ac831d4e
Fix type 2020-12-11 22:44:22 +08:00
Amos Bird
5b1e5679b4
Add -SimpleState combinator 2020-12-11 11:43:56 +08:00
Alexander Kuzmenkov
d757f32300 Remove some redundant includes to speed up build 2020-12-11 02:58:11 +03:00
Nikolai Kochetov
7d77a7ba24
Merge pull request #16952 from Enmk/DateTime64_fixes_comparison
Fixed comparison of DateTime64 with different scales
2020-12-08 12:40:41 +03:00
Ivan
315ff4f0d9
ANTLR4 Grammar for ClickHouse and new parser (#11298) 2020-12-04 05:15:44 +03:00
Vasily Nemkov
87945fb68b Merge branch 'master' into HEAD 2020-11-30 23:25:57 +03:00
alexey-milovidov
572bdb4090
Merge pull request #17423 from ClickHouse/remove-time-series-group-sum
Remove timeSeriesGroupSum
2020-11-26 23:07:46 +03:00
Alexander Kuzmenkov
15a0f14445
Merge pull request #15419 from myrrc/improvement/diff-types-in-avg-weighted
Allow different types in avgWeighted. Allow avg and avgWeighed to operate on extended integral types.
2020-11-26 17:16:48 +03:00
Nikita Mikhaylov
adb82649c4
Merge pull request #16883 from nikitamikhaylov/refactor-rank-corr
mannWhitneyUTest + studentTTest + welchTTest + small rankCorr refactor
2020-11-26 15:17:18 +03:00
Alexey Milovidov
85d3e62275 Remove timeSeriesGroupSum 2020-11-26 05:46:28 +03:00
nikitamikhaylov
44f4064e9b update test 2020-11-25 20:51:07 +03:00
nikitamikhaylov
4246971961 fix tests 2020-11-25 20:51:07 +03:00
nikitamikhaylov
d1eb9f02dd style 2020-11-25 20:51:06 +03:00
nikitamikhaylov
0779c7e0c3 better 2020-11-25 20:51:06 +03:00
nikitamikhaylov
b3087d0eb3 comments 2020-11-25 20:51:06 +03:00
nikitamikhaylov
f764332070 better merge 2020-11-25 20:51:06 +03:00
nikitamikhaylov
3f874af323 new interface for the function
(cherry picked from commit 89547e77cf)
2020-11-25 20:51:06 +03:00
nikitamikhaylov
85ac4c4f36 better
(cherry picked from commit 516b152af3)
2020-11-25 20:51:06 +03:00
Alexey Milovidov
fb234c2b17 Fix comments
(cherry picked from commit 7065e50c74)
(cherry picked from commit 1f21160041)
2020-11-25 20:51:06 +03:00
Alexey Milovidov
be84bd1aba Add missing file
(cherry picked from commit 2f3415be5d)
(cherry picked from commit a819558889)
2020-11-25 20:51:06 +03:00
Alexey Milovidov
a7739d9afb Make the code less bad
(cherry picked from commit 911cd77c1a)
(cherry picked from commit ac7267ce48)
2020-11-25 20:51:06 +03:00
nikitamikhaylov
88fec92921 initial
(cherry picked from commit 158665e84f)
2020-11-25 20:51:06 +03:00
nikitamikhaylov
9177ba3c02 test added 2020-11-25 20:51:06 +03:00
nikitamikhaylov
02ce3ed4e7 style 2020-11-25 20:51:06 +03:00
nikitamikhaylov
de75c96a75 better 2020-11-25 20:51:06 +03:00
nikitamikhaylov
13081370ba mann-whitney 2020-11-25 20:51:06 +03:00
nikitamikhaylov
9afe579225 small refactor 2020-11-25 20:51:06 +03:00
nikitamikhaylov
78b510eaa1 naming 2020-11-25 20:12:14 +03:00
myrrc
b7e94b487c fixed scale calc, again 2020-11-24 17:29:30 +03:00
myrrc
420f2489a7 fixed decimal scales calc, updated the tests 2020-11-24 17:07:59 +03:00
myrrc
fbb0e6e6aa Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-11-24 16:04:17 +03:00
Alexey Milovidov
fbbf439338 Merge branch 'master' into Enmk-DateTime64_fixes_comparison 2020-11-23 05:46:17 +03:00
Alexey Milovidov
1a073f700f Fix exception message 2020-11-23 05:44:42 +03:00
Nikolai Kochetov
bac1def5f9
Merge pull request #17134 from abyss7/tcp-port
Implement tcpPort() function for tests
2020-11-20 20:32:55 +03:00
Ivan Lezhankin
fdd1c182ab Merge remote-tracking branch 'upstream/master' into tcp-port 2020-11-18 16:22:00 +03:00
Vasily Nemkov
1fd758d957 Fixed various DateTime64 related hiccups
Added std::hash overload
Fixed the way aggregate functions work with DateTime64
Added an option for an aggregate function to opt out from DateTime64 support
Disable support of DateTime64 for AggregateFunctionSun, since it makes very little sense.
2020-11-18 10:20:52 +03:00
myrrc
7469b3f6c8 Merge remote-tracking branch 'upstream/aku/merge-avg-weighted' into improvement/diff-types-in-avg-weighted 2020-11-17 22:14:48 +03:00
myrrc
ce42dcf39c replaced explicit stack values with references 2020-11-17 21:10:42 +03:00
Ivan Lezhankin
f897f7c93f Refactor IFunction to execute with const arguments 2020-11-17 16:24:45 +03:00
Grigory Buteyko
81b9d6a948 Merge branch 'master' into hrissan/prevent_tdigest_uncontrolled_growth 2020-11-17 14:40:34 +03:00
Pavel Kruglov
7ecd207eac Remove unnecessary QuantileTDigest layer 2020-11-17 14:01:51 +03:00
alexey-milovidov
b494b18748
Merge pull request #17108 from ClickHouse/ya-make-owners
Add "OWNER" to ya.make files.
2020-11-17 05:19:46 +03:00
Alexey Milovidov
24f4fa6edf Follow Arcadia ya.make rules 2020-11-17 00:16:50 +03:00
Alexey Milovidov
3df04ce0c2 Follow Arcadia ya.make rules 2020-11-16 21:24:58 +03:00
Alexander Kuzmenkov
2f5e3f66a7 typo 2020-11-16 20:54:40 +03:00
Alexander Kuzmenkov
3ba8155d38 typo 2020-11-16 20:04:12 +03:00
Alexander Kuzmenkov
216098afc8 Merge remote-tracking branch 'origin/master' into HEAD 2020-11-16 19:10:10 +03:00
Alexander Kuzmenkov
b0e660651a cleanup 2020-11-16 19:09:58 +03:00
myrrc
862c8a428c Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-11-16 14:40:49 +03:00
Nikolai Kochetov
00de84fbe3
Merge pull request #16610 from zhang2014/fix/ISSUES-16574
ISSUES-16574 try fix remote query failure when using 'if' suffix aggregate function
2020-11-16 12:41:14 +03:00
Vasily Nemkov
63d168d34e Fixed MySQL and DateTime64 integration.
Also updated other places, like type helpers/dispatchers where DateTime64
was implicitly supported before as Decimal64.
2020-11-16 09:02:41 +03:00
myrrc
b1c0089b78 Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-11-14 16:50:04 +03:00
Grigory Buteyko
1a02ec85a5 naming issue compress_brute fixed to compressBrute 2020-11-13 19:09:59 +03:00
Grigory Buteyko
2a22941504 naming issue compress_brute fixed to compressBrute 2020-11-13 19:04:53 +03:00
Ivan
902091cc07
Slightly better miniselect usage (#16896)
* Slightly better miniselect usage
* Update ColumnDecimal.cpp
2020-11-13 14:28:18 +03:00
alexey-milovidov
2151365764
Merge pull request #16865 from filimonov/timeSeriesGroupSum-segfault
Fix for issue #16862
2020-11-12 19:39:14 +03:00
Pavel Kruglov
38c126ecfd Fix style and build error 2020-11-12 16:13:30 +03:00
myrrc
a8d8dd7d3e Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-11-12 14:50:59 +03:00
alexey-milovidov
6e62108606
Merge pull request #16774 from ucasFL/agg-func-setting-null-for-empty
fix Aggregation Function not found error after #16123
2020-11-12 13:50:15 +03:00
filimonov
ec6f092683
Update AggregateFunctionTimeSeriesGroupSum.h 2020-11-12 09:40:26 +01:00
tavplubix
058aa8f85e
Merge pull request #16824 from ClickHouse/replace_stringstreams_with_buffers
Replace std::*stringstreams with DB::*Buffers
2020-11-12 01:11:44 +03:00
Mikhail Filimonov
3b2c681ac6
blind fix 2020-11-11 13:25:05 +01:00
Nikolai Kochetov
0410e383d9 Try fix check. 2020-11-11 12:46:36 +03:00
Nikolai Kochetov
ac8b658a4a Try fix ci. 2020-11-10 23:25:29 +03:00
Grigory Buteyko
c898ec00d9 Exception instead of std::runtime_error 2020-11-10 23:03:36 +03:00
Alexander Tokmakov
b94cc5c4e5 remove more stringstreams 2020-11-10 21:22:26 +03:00
myrrc
e460248624 Merge remote-tracking branch 'upstream/master' into improvement/diff-types-in-avg-weighted 2020-11-10 14:54:24 +03:00
Danila Kutenin
a4e000cc9f Fix name 2020-11-10 00:55:17 +03:00
Danila Kutenin
d0840bfc5d Move miniselect to submodule and replace quantile exact with better algorithm 2020-11-10 00:53:43 +03:00
Alexander Tokmakov
a06be511df pcg serialization 2020-11-09 16:07:38 +03:00
zhang2014
1726fb0f4e ISSUES-16574 try fix test failure 2020-11-09 12:40:28 +08:00
zhang2014
540288c419 Merge branch 'master' into fix/ISSUES-16574 2020-11-09 10:05:56 +08:00
Grigory Buteyko
08a266cf72 removed dependence of invariants on floating point black box properties. Now more than 2048 centroids will never be written, on read, however, we allow more centroids and just compress them. if there is too much. Thus we allow loading TDigests with different error, as number of centroids is dependent on error. 2020-11-09 00:44:41 +03:00