Commit Graph

116490 Commits

Author SHA1 Message Date
kevinyhzou
911f8ad8dc use whitespace or tab as field delimiter 2023-06-12 11:57:52 +08:00
kevinyhzou
f4202963ad test modify 2023-06-08 21:06:38 +08:00
kevinyhzou
48e1b21aab Add feature to support read csv by space & tab delimiter 2023-06-08 20:34:30 +08:00
flynn
92c87dedad
Add parallel state merge for some other combinator except If (#50413)
* Add parallel state merge for some other combinator except If

* add test

* update test
2023-06-08 00:41:32 +02:00
Antonio Andelic
b11f744252
Correctly disable async insert with deduplication when it's not needed (#50663)
* Correctly disable async insert when it's not used

* Better

* Add comment

* Better

* Fix tests

---------

Co-authored-by: Nikita Mikhaylov <mikhaylovnikitka@gmail.com>
2023-06-07 20:33:08 +02:00
Alexey Milovidov
2763f010c5
Merge pull request #50588 from danlark1/patch-1
Enable LZ4_FAST_DEC_LOOP for Arm to get 5% of decompression speed
2023-06-07 21:27:10 +03:00
robot-ch-test-poll4
df383cad33
Merge pull request #50587 from ClickHouse/fix-01487_distributed_in_not_default_db
Analyzer: fix 01487_distributed_in_not_default_db
2023-06-07 20:26:53 +02:00
Nikita Mikhaylov
c0f2141bd0
Revert "date_trunc function to always return DateTime type" (#50670) 2023-06-07 19:51:41 +02:00
Nikita Mikhaylov
e1ceb01ad0
Parallel replicas for short queries (#50639) 2023-06-07 19:45:27 +02:00
Rich Raposa
06b05cf2aa
Merge pull request #50664 from ClickHouse/fix-docs-tuple-with-aggregates
Some minor fixes about using `Tuple` in aggregate functions
2023-06-07 06:07:52 -06:00
Azat Khuzhin
036ddcd47b
Fix excessive memory usage for FINAL (due to too much streams usage) (#50429)
Previously it could create MergeTreeInOrder for each mark, however this
could be very suboptimal, due to each MergeTreeInOrder has some memory
overhead.

Now, by collapsing all marks for one part together it is more memory
effiecient.

I've tried the query from the altinity wiki [1] and it decreases memory
usage twice:

    SELECT * FROM repl_tbl FINAL WHERE key IN (SELECT toUInt32(number) FROM numbers(1000000) WHERE number % 50000 = 0) FORMAT Null

- upstream: MemoryTracker: Peak memory usage (for query): 520.27 MiB.
- patched:  MemoryTracker: Peak memory usage (for query): 260.95 MiB.

  [1]: https://kb.altinity.com/engines/mergetree-table-engine-family/replacingmergetree/#multiple-keys

And it could be not 2x and even more or less, it depends on the gaps in
marks for reading (for example in my setup the memory usage increased a
lot, from ~16GiB of RAM to >64GiB due to lots of marks and gaps).

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-06-07 13:48:08 +02:00
Kseniia Sumarokova
d25ea9b0cf
Merge pull request #50470 from kssenii/add-some-assertions-2
Add some assertions
2023-06-07 12:28:28 +02:00
János Benjamin Antal
35ef14482d Fix keyword capitalization 2023-06-07 10:13:13 +00:00
János Benjamin Antal
1a3dc7c3ed
Merge branch 'master' into fix-docs-tuple-with-aggregates 2023-06-07 12:11:03 +02:00
János Benjamin Antal
e0bc695e2d Use correct link format 2023-06-07 10:07:35 +00:00
Alexey Milovidov
6e9c08bbf4
Merge pull request #50642 from johanngan/regexptree-bad-opt
Revert invalid RegExpTreeDictionary optimization
2023-06-07 13:00:20 +03:00
robot-ch-test-poll3
9c72449a34
Merge pull request #50607 from den-crane/patch-25
Doc. Clarification about ArgMax/Min behavior
2023-06-07 11:34:12 +02:00
Anton Popov
1e6b84c59c
Merge pull request #50660 from CurtizJ/merging-50329
Merging #50329
2023-06-07 11:18:42 +02:00
Anton Popov
3c2a6200e5 Merge branch 'ignore_index' of https://github.com/ClibMouse/ClickHouse into merging-50329 2023-06-07 09:15:57 +00:00
Antonio Andelic
26fb80b540
Merge pull request #50615 from ClickHouse/fix-jepsen-check
Fix Jepsen runs in PRs
2023-06-07 08:43:51 +02:00
Alexey Milovidov
9b49469e54
Merge pull request #50637 from Avogar/values-lc-null
Fix converting Null to LowCardinality(Nullable) in values table function
2023-06-07 07:38:11 +03:00
Alexey Milovidov
c02da1320f
Merge branch 'master' into regexptree-bad-opt 2023-06-07 07:37:17 +03:00
Alexey Milovidov
a61c8e246d
Merge pull request #50629 from Algunenano/revert_incorrect_optimizations
Revert incorrect optimizations
2023-06-07 05:34:07 +03:00
robot-ch-test-poll4
1be026d33e
Merge pull request #50644 from ClickHouse/rfraposa-patch-3
Update nyc-taxi.md
2023-06-07 04:32:54 +02:00
robot-ch-test-poll
1b1e3fbdd4
Merge pull request #50636 from ClickHouse/nickitat-patch-11
Disable 01676_clickhouse_client_autocomplete under UBSan
2023-06-07 01:36:58 +02:00
Boris Kuschel
45d000b717 Turn off analyzer for test 2023-06-06 19:08:42 -04:00
Boris Kuschel
1fa1215d15 Avoid UB 2023-06-06 19:08:42 -04:00
Boris Kuschel
7c2b88a00e Make test invariant 2023-06-06 19:08:42 -04:00
Boris Kuschel
689e0cabe0 Add space to if 2023-06-06 19:08:42 -04:00
Boris Kuschel
f552b96451 Add docs for ignore index 2023-06-06 19:08:42 -04:00
Boris Kuschel
068b1fbbcc Add ability to ignore index 2023-06-06 19:08:42 -04:00
robot-clickhouse
707abc85f4
Merge pull request #50608 from Misz606/patch-1
Update aggregatingmergetree.md
2023-06-07 01:07:51 +02:00
robot-ch-test-poll1
9783f8c746
Merge pull request #50643 from ClickHouse/rfraposa-patch-2
Style fix
2023-06-07 00:42:54 +02:00
Rich Raposa
5f48f02023
Update index.md 2023-06-06 16:10:22 -06:00
Rich Raposa
a89c129c49
Update nyc-taxi.md
Use gcs function (instead of s3) for the GCS files
2023-06-06 15:54:57 -06:00
Rich Raposa
195cc51c43
Style fix 2023-06-06 15:51:03 -06:00
johanngan
be8e048799 Revert invalid RegExpTreeDictionary optimization
This reverts the following commits:
- e77dd81036
- e8527e720b

Additionally, functional tests are added.

When scanning complex regexp nodes sequentially with RE2, the old code
has an optimization to break out of the loop early upon finding a leaf
node that matches. This is an invalid optimization because there's no
guarantee that it's actually a VALID match, because its parents might
NOT have matched. Semantically, a user would expect this match to be
discarded and for the search to continue. Instead, since we skipped
matching after the first false positive, subsequent nodes that would
have matched are missing from the output value. This affects both
dictGet and dictGetAll.

It's difficult to distinguish a true positive from a false positive
while looping through complex_regexp_nodes because we would have to scan
all the parents of a matching node to confirm a true positive. Trying to
do this might actually end up being slower than just scanning every
complex regexp node, because complex_regexp_nodes is only a subset of
all the tree nodes; we may end up duplicating work with scanning
that Vectorscan has already done, depending on whether the parent nodes
are "simple" or "complex". So instead of trying to fix this
optimization, just remove it entirely.
2023-06-06 16:28:44 -05:00
Han Fei
4130e1e9ac
Merge branch 'master' into revert_incorrect_optimizations 2023-06-06 21:44:39 +02:00
avogar
e9c267ed69 Fix converting Null to LowCardinality(Nullable) in values table function 2023-06-06 17:51:53 +00:00
Kruglov Pavel
5af1819143
Merge pull request #50586 from Avogar/better-avro-decimal
Better support for avro decimals
2023-06-06 19:40:59 +02:00
Nikita Taranov
b6c8ce30ec
Disable 01676_clickhouse_client_autocomplete under UBSan 2023-06-06 19:38:11 +02:00
Raúl Marín
473743b49f
Disable pure parallel replicas if trivial count optimization is possible (#50594) 2023-06-06 18:38:32 +02:00
Raúl Marín
1910d6580e Add test for the reverted broken optimizations 2023-06-06 16:13:51 +02:00
Raúl Marín
8d2b868312 Revert "Merge pull request #50062 from ZhiguoZh/20230511-toyear"
This reverts commit 55c2dbcc2d, reversing
changes made to 23f894b995.
2023-06-06 16:10:22 +02:00
Raúl Marín
68a9ea72de Revert "Merge pull request #50307 from ZhiguoZh/20230527-toyyyymm"
This reverts commit 17261e52da, reversing
changes made to d302eae85e.
2023-06-06 16:10:01 +02:00
Denny Crane
08331ebcfe
Merge branch 'master' into patch-25 2023-06-06 10:32:32 -03:00
Denny Crane
67a6623a38
Update argmin.md 2023-06-06 10:32:10 -03:00
Denny Crane
e63fc91e73
Update argmax.md 2023-06-06 10:30:10 -03:00
Denny Crane
496bc25bff
Update docs/en/sql-reference/aggregate-functions/reference/argmin.md
Co-authored-by: János Benjamin Antal <antaljanosbenjamin@users.noreply.github.com>
2023-06-06 10:26:35 -03:00
Denny Crane
d6ee50577a
Update argmin.md 2023-06-06 10:25:32 -03:00