Azat Khuzhin
4e8370b0b0
Fix SimpleAggregateFunction for String longer MAX_SMALL_STRING_SIZE
...
SimpleAggregateFunction do not pass arena to the
add_function -> getAddressOfAddFunction(), hence next crash happens:
(gdb) bt
#0 DB::Arena::alloc (size=64, this=0x0) at ../dbms/src/Common/Arena.h:124
#1 DB::SingleValueDataString::changeImpl (this=0x7f97424a27d8, value=..., arena=0x0) at ../dbms/src/AggregateFunctions/AggregateFunctionMinMaxAny.h:274
#2 0x0000000005ea5319 in DB::AggregateFunctionNullUnary<true>::add (arena=<optimized out>, row_num=<optimized out>, columns=<optimized out>, place=<optimized out>, this=<optimized out>) at ../dbms/src/AggregateFunctions/AggregateFunctionNull.h:43
#3 DB::IAggregateFunctionHelper<DB::AggregateFunctionNullUnary<true> >::addFree (that=<optimized out>, place=<optimized out>, columns=<optimized out>, row_num=<optimized out>, arena=<optimized out>) at ../dbms/src/AggregateFunctions/IAggregateFunction.h:131
#4 0x000000000679772f in DB::AggregatingSortedBlockInputStream::addRow (this=this@entry=0x7f982de19c00, cursor=...) at ../dbms/src/Common/AlignedBuffer.h:31
#5 0x0000000006797faa in DB::AggregatingSortedBlockInputStream::merge (this=this@entry=0x7f982de19c00, merged_columns=..., queue=...) at ../dbms/src/DataStreams/AggregatingSortedBlockInputStream.cpp:140
#6 0x0000000006798979 in DB::AggregatingSortedBlockInputStream::readImpl (this=0x7f982de19c00) at ../dbms/src/DataStreams/AggregatingSortedBlockInputStream.cpp:78
#7 0x000000000622db55 in DB::IBlockInputStream::read (this=0x7f982de19c00) at ../dbms/src/DataStreams/IBlockInputStream.cpp:56
#8 0x0000000006613bee in DB::MergeTreeDataMergerMutator::mergePartsToTemporaryPart (this=this@entry=0x7f97ec65e1a0, future_part=..., merge_entry=..., time_of_merge=<optimized out>, disk_reservation=<optimized out>, deduplicate=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:1018
#9 0x000000000658f7a4 in DB::StorageReplicatedMergeTree::tryExecuteMerge (this=0x7f97ec65b810, entry=...) at /usr/include/c++/8/bits/unique_ptr.h:342
#10 0x00000000065940ab in DB::StorageReplicatedMergeTree::executeLogEntry (this=0x7f97ec65b810, entry=...) at ../dbms/src/Storages/StorageReplicatedMergeTree.cpp:910
<snip>
(gdb) f 1
(gdb) p MAX_SMALL_STRING_SIZE
$1 = 48
(gdb) p capacity
$2 = 64
(gdb) p value
$3 = {data = 0x7f97242fcbd0 "HHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH", size = 61}
v2: avoid leaking of allocated by Arena memory on the intermediate step
Fixes: 8f8d2c048e
("Merge pull request #4629 from bgranvea/simple_aggregate_function")
2019-05-19 03:32:55 +03:00
alexey-milovidov
2254b171a7
Merge pull request #5313 from yandex/fix-external-query-in-with-single-element
...
Fix external queries with IN operator.
2019-05-19 03:12:57 +03:00
alexey-milovidov
e73fc1bd0f
Merge pull request #5320 from sundy-li/feature/funnel64
...
Make windowFunnel support other Unsigned Integer Types
2019-05-18 23:47:12 +03:00
Danila Kutenin
fca6e4fd38
constant string handling
2019-05-18 18:09:52 +03:00
Danila Kutenin
84b04dc8ea
format function added
2019-05-18 15:29:10 +03:00
Danila Kutenin
a48cf9abe5
format function added
2019-05-18 14:30:50 +03:00
Danila Kutenin
4e3a607267
format function added
2019-05-18 14:30:36 +03:00
alexey-milovidov
24b16da9fd
Merge pull request #5235 from vitlibar/improve-new-json-functions
...
Improve new json functions
2019-05-18 12:51:41 +03:00
alexey-milovidov
8b9b305a5f
Merge pull request #5325 from abyss7/issue-5286
...
Allow to shadow virtual column '_table' in Merge engine
2019-05-18 00:17:34 +03:00
alexey-milovidov
34f36e2891
Merge pull request #5304 from 4ertus2/funcs
...
Support quantile(s) and median for Decimal
2019-05-17 23:03:27 +03:00
Ivan Lezhankin
7b6c78402d
Allow to shadow virtual column '_table' in Merge engine
2019-05-17 20:40:51 +03:00
Danila Kutenin
0d3422fa8a
toValidUTF8 function added
2019-05-17 15:55:21 +03:00
sundy-li
760bc5708d
support unsigned integer type in windowFunnel Aggregate function
2019-05-17 19:17:52 +08:00
Alexey Milovidov
efd882aa29
Better logic
2019-05-16 22:55:18 +03:00
Vitaly Baranov
823d862ceb
Add a setting to disable simdjson.
2019-05-16 22:39:49 +03:00
Alexey Milovidov
842d62463b
Added more tests
2019-05-16 22:26:32 +03:00
Vitaly Baranov
cb459c79aa
Add a test case with incorrect JSON.
2019-05-16 20:43:01 +03:00
Vitaly Baranov
8ab4e4dcfe
Use rapidjson when AVX2 instructions are not available.
2019-05-16 20:40:24 +03:00
Artem Zuikov
c3588fd5da
Merge pull request #5291 from 4ertus2/nulls
...
Add toDecimalOrZero and toDecimalOrNull fuctions
2019-05-16 18:53:17 +03:00
chertus
fdcbf509bb
support quantile(s)ExactWeighted for Decimal
2019-05-16 17:33:13 +03:00
Vitaly Baranov
ae4f472bc7
Add tests cases and fix documentation for JSON functions.
2019-05-16 16:48:19 +03:00
chertus
50c35a70db
support quanitle, quantiles, median for Decimal
2019-05-16 15:53:33 +03:00
chertus
ab517cdf4d
Merge branch 'master' into decimal
2019-05-16 14:22:52 +03:00
Vitaly Baranov
f4942007e1
Add function JSONExtractKeysAndValues().
2019-05-16 14:09:22 +03:00
Vitaly Baranov
c93bd31695
Simplify template implementation.
2019-05-16 14:09:22 +03:00
Vitaly Baranov
76bda0342b
Move ExtraArg to the end of arguments of JSONExtract().
2019-05-16 14:09:22 +03:00
Vitaly Baranov
d003682626
Implement function JSONExtractRaw().
2019-05-16 14:09:22 +03:00
Vitaly Baranov
8be2e728c0
Use capital letters in the names of json functions: jsonHas => JSONHas
2019-05-16 14:09:22 +03:00
Vitaly Baranov
0d26ac8583
Reimplement indices in objects in more straightforward way
2019-05-16 14:09:22 +03:00
chertus
2739a3f6d0
Merge branch 'master' into nulls
2019-05-16 14:02:12 +03:00
alexey-milovidov
dcc88f3a0c
Merge pull request #5284 from 4ertus2/bugs
...
fix decimal quoted csv input
2019-05-16 00:07:23 +03:00
chertus
5f19c0981d
add toDecimalOrZero and toDecimalOrNull fuctions
2019-05-15 21:50:35 +03:00
Yangkuan Liu
0760a3436f
add AggregateFunction TSgroup{Rate}Sum ( #4542 )
2019-05-15 19:16:25 +03:00
chertus
720f8667e4
fix decimal quoted csv input
2019-05-15 16:51:17 +03:00
chertus
02f01a5104
throw Decimal overflow for Inf and NaN
2019-05-15 15:28:44 +03:00
svladykin
2ca74ec259
minor tests fix
2019-05-15 13:54:58 +03:00
Vitaly Baranov
9620e2e223
Merge pull request #5003 from Enmk/geohash_support
...
Implementation of geohashEncode and geohashDecode functions;
2019-05-14 20:01:22 +03:00
Alexander Kozhikhov
003a0fbadf
conflict fix
2019-05-13 17:43:47 +03:00
Alexander Kozhikhov
9b4f322fd8
Merge branch 'master' of https://github.com/yandex/ClickHouse
2019-05-13 16:50:56 +03:00
Guillaume Tassery
1ae8948177
Merge branch 'master' of https://github.com/yandex/ClickHouse into send_header
2019-05-13 13:35:12 +07:00
Guillaume Tassery
e2f70714a1
update tests
2019-05-13 12:07:18 +07:00
Guillaume Tassery
1b30f91c42
Return to old implementation of read and write values for progress
2019-05-13 11:48:09 +07:00
Nikita Vasilev
ee3c50e1a0
mayBeTrueOnGranule
2019-05-12 20:08:28 +03:00
Nikita Vasilev
3e02eaf28d
fix null minmax
2019-05-12 20:01:36 +03:00
svladykin
22389d4eca
Support for bitmapHasAny and bitmapHasAll functions.
2019-05-12 17:47:31 +03:00
alexey-milovidov
9ce2dd8803
Merge pull request #5238 from janplus/if-nullable-bug
...
Fix if, multiIf's nullable bug.
2019-05-12 11:47:37 +03:00
alexey-milovidov
f7343ecb6f
Merge pull request #4639 from IvanKush/feat/parallel-alter-modify
...
feat alter: parallelize processing of parts in alter modify
2019-05-12 00:39:46 +03:00
ivan-kush
5f6ab5eb10
tsan?
2019-05-11 21:30:24 +03:00
ivan-kush
ebdd5af7ab
add test
2019-05-11 21:12:24 +03:00
Vasily Nemkov
e4988110ec
Implementation of geohashEncode and geohashDecode functions;
...
Function signatures:
* geohashEncode(float lon, float lat, int precision) => string
* geohashDecode(string encoded) => (float llon, float lat)
With test cases and documentation;
2019-05-10 14:59:24 +03:00
吴健
bd43e8bada
Fix if, multiIf's nullable bug.
2019-05-10 18:42:44 +08:00
alexey-milovidov
001e4bfe76
Merge pull request #5209 from PerformanceVision/rename_mv
...
Support rename operation for MaterializeView storage
2019-05-09 23:10:41 +03:00
alexey-milovidov
9f5e1a5b80
Merge pull request #5228 from andyyzh/fix_bitmap_issue_5220
...
Fix bitmap functions crash the server bug segfault
2019-05-09 23:06:57 +03:00
alexey-milovidov
a1cb9a2d67
Merge pull request #5152 from janplus/bug-null-in
...
Fix null problem in FunctionIn
2019-05-09 19:22:41 +03:00
alexey-milovidov
8f8d2c048e
Merge pull request #4629 from bgranvea/simple_aggregate_function
...
SimpleAggregateFunction data type
2019-05-09 18:45:59 +03:00
Andy Yang
4b66622601
Fix bitmap functions crash the server bug segfault
2019-05-09 17:24:36 +08:00
Vitaly Baranov
7ace113ac0
Use custom cmake file for simdjson and fix build
2019-05-08 16:20:25 +03:00
hcz
682ce99133
Return strings in jsonType
2019-05-08 16:20:25 +03:00
hcz
706f335042
Format code and update tests
2019-05-08 16:20:25 +03:00
hcz
560246c0c3
Add Simdjson API
2019-05-08 16:20:25 +03:00
吴健
3893a4943d
Fix nulls_in test case.
2019-05-07 16:27:24 +08:00
Guillaume Tassery
b91fd18704
Update test reference
2019-05-07 14:36:05 +07:00
Guillaume Tassery
55dc86ef74
Support rename operation for MaterializeView storage
2019-05-07 13:54:55 +07:00
Guillaume Tassery
6dcaadc620
Merge remote-tracking branch 'upstream/master' into send_header
2019-05-06 17:18:41 +07:00
hcz
4f3e164c73
Fix and add tests
2019-05-06 12:08:54 +08:00
Danila Kutenin
f613c06c47
ngram vector_vector distance added
2019-05-05 23:48:46 +03:00
Danila Kutenin
ca4f098362
fix hyperscan to treat regular expressions as utf-8 expressions
2019-05-05 09:51:59 +03:00
Alexey Milovidov
eb0a8d1709
More robust test
2019-05-05 02:42:36 +03:00
Alexey Milovidov
b2f44beeb4
Addition to prev revision
2019-05-05 02:39:37 +03:00
Alexey Milovidov
a924e1c5fb
Now the test reproduces the issue clearly
2019-05-05 02:38:40 +03:00
Alexey Milovidov
4dc5671482
Merge branch 'master' into system_columns_race_condition
2019-05-03 03:21:49 +03:00
alexey-milovidov
9e3c80d2ed
Merge pull request #5170 from yandex/cidr-to-range-better-code
...
Cidr to range better code
2019-05-02 19:29:36 +03:00
Alexey Milovidov
0a072ccc57
Added a test for race condition
2019-05-02 18:13:57 +03:00
Alexey Milovidov
6a271adad3
Added max_parts_in_total threshold to MergeTree tables
2019-05-02 17:48:54 +03:00
Alexey Milovidov
0381a6a1ec
Better code for CIDR to range functions #5095
2019-05-02 01:09:24 +03:00
alexey-milovidov
2dccdb18eb
Merge pull request #5095 from PerformanceVision/CIDR_MASK
...
Functions for calculate lower and high range of an IP address using a CIDR mask
2019-05-02 01:00:29 +03:00
Nikolai Kochetov
be91f09417
Merge branch 'master' into fix-low-cardinality-keys-in-set-index
2019-04-30 20:26:18 +03:00
alexey-milovidov
cd16c3a3c9
Update 00931_low_cardinality_set_index_in_key_condition.sql
2019-04-30 19:21:33 +03:00
alexey-milovidov
e7ec3b9eb8
Merge pull request #5136 from PerformanceVision/basename
...
Add a basename function
2019-04-30 19:15:35 +03:00
Nikolai Kochetov
0b7bf0c794
Added test. #5031
2019-04-30 13:46:04 +03:00
吴健
acbeedad38
Fix null problem in FunctionIn
2019-04-30 11:50:30 +08:00
alexey-milovidov
0a34e05130
Merge pull request #5138 from CurtizJ/limit-by-offset
...
Added support of LIMIT n, m BY clause.
2019-04-30 00:17:29 +03:00
CurtizJ
7766f5c0c3
added offset for limit by
2019-04-29 16:12:39 +03:00
Guillaume Tassery
87b60f0a3b
Add test for basename function
2019-04-29 17:18:02 +07:00
alexey-milovidov
1d69a73424
Merge pull request #5119 from nicelulu/update_24
...
modification retention function
2019-04-29 04:51:18 +03:00
Ivan
9edbbc637a
Fix segmentation fault on iterator double-free inside RWLock ( #5127 )
...
* Store the key instead of iterator, which may get invalidated by erasure from another instance.
* Add test
2019-04-27 22:12:35 +03:00
Vitaly Baranov
8277e9d8f1
Refactoring of Settings based on new template class SettingsCollection.
...
Add new class SettingsConstraints.
2019-04-26 19:11:05 +03:00
alesapin
99e9c2d534
Temporary disable flapping test
2019-04-26 15:57:56 +03:00
821008736@qq.com
02e9cc8f2d
fix retention function
2019-04-26 17:36:35 +08:00
Guillaume Tassery
f21004ed7e
IPv4CIDRtoIPv4Range and IPv6CIDRtoIPv6Range return now an IP
2019-04-26 13:30:07 +07:00
Guillaume Tassery
7b1be6efc4
Clode cleaning and add test for X-ClickHouse-Summary header
2019-04-26 10:46:52 +07:00
Guillaume Tassery
ced71ac9fd
Send how many rows and bytes were written during the query
2019-04-25 18:25:49 +07:00
alexey-milovidov
445f51c01e
Merge pull request #4439 from kvinty/kvinty-radix-sort
...
Use radixSort in ORDER BY + add performance test
2019-04-25 02:45:38 +03:00
Alexey Milovidov
ce9b5a4341
Added bug #5066
2019-04-24 19:52:44 +03:00
alexey-milovidov
1de889c201
Merge pull request #5081 from Akazz/master
...
Support for header specified order of columns in TSVWithNames/CSVWithNames formats
2019-04-24 18:59:09 +03:00
alexey-milovidov
d2a4aa964d
Merge pull request #5026 from PerformanceVision/uniq_array
...
Add an optional max_size parameter to groupUniqArray
2019-04-24 14:34:39 +03:00
Guillaume Tassery
74746de0cb
Add functional tests for ipv6 range function
2019-04-24 12:17:21 +07:00
Guillaume Tassery
31f8eecdc2
Add functional tests for ipv4 range function
2019-04-24 11:18:46 +07:00
Alexander Kazakov
f93fe77fd5
Added chmod +x for test scripts
2019-04-22 19:37:22 +03:00
Alexander Kazakov
bd62651ea3
Dropped a few debug leftovers
2019-04-22 16:42:52 +03:00