Robert Schulze
96e3a4f9b4
Update src/Functions/byteSwap.cpp
...
Co-authored-by: Priyansh Agrawal <agrawal.priyansh@yahoo.in>
2023-10-10 23:45:23 +02:00
Robert Schulze
31ae84604f
Some fixups
2023-10-10 09:54:06 +00:00
Priyansh Agrawal
9677dedd87
Add negative tests.
...
Also:
- Add comments in tests.
- Add an example in docs where an IPv4 is casted to an int, byteswapped
and then casted back to an IPv4.
2023-10-09 21:52:06 +00:00
Priyansh Agrawal
2e4709fd10
Remove "unsigned" from docs now that we support all ints.
2023-10-09 21:16:46 +00:00
Priyansh Agrawal
63b0df9f1d
byteSwap is now documented; remove it from the list of undocumented functions
2023-10-08 13:25:09 +00:00
Priyansh Agrawal
2c04370e5f
Use std::byteswap instead of custom implementations.
...
- Also allow signed ints now because std::byteswap accepts them.
- Fix for style check.
2023-10-07 23:59:24 +00:00
Priyansh Agrawal
302291e17b
Address a few review comments.
...
- Consider byteswap injective.
- Make function case-insensitive.
- Add in-code documentation and copy-paste it to the markdown docs.
2023-10-07 23:05:07 +00:00
Priyansh Agrawal
ed2c85bbce
Remove comment
2023-10-06 19:35:11 +00:00
Priyansh Agrawal
c8216d2b00
Add tests
2023-10-06 19:32:46 +00:00
Priyansh Agrawal
540d966033
Docs and comment
2023-10-02 22:51:58 +01:00
Priyansh Agrawal
46fbe00c9a
Implement byteswap for following dtypes.
...
UInt[8|16|32|64]
TODOs:
- Improve NOT_IMPLEMENTED error message.
- Add implementation for FixedStrings (reverse the bytes).
- See whether this needs to be implemented for UInt[128|256] and
signed integers as well.
2023-10-02 19:02:33 +01:00
Priyansh Agrawal
f27a76b923
Add function byteSwap
.
...
byteSwap accepts an integer `operand` and returns the integer which is
obtained by swapping the **endianness** of `operand` i.e. reversing the
bytes of the `operand`.
Issue: #54734
2023-09-24 21:02:09 +01:00
Alexey Milovidov
477922617c
Merge pull request #54961 from ClickHouse/remove-test-hash_table_sizes_stats
...
Remove test `02151_hash_table_sizes_stats`
2023-09-24 20:28:15 +03:00
Alexey Milovidov
81cfa0344a
Remove test 02151_hash_table_sizes_stats
2023-09-24 19:27:35 +02:00
robot-ch-test-poll3
f23339b4be
Merge pull request #54946 from azat/system.stack_trace-max_block_size
...
Respect max_block_size while generating rows for system.stack_trace (will fix flakiness of the test)
2023-09-24 19:10:17 +02:00
Alexey Milovidov
7bef66ae6a
Merge pull request #54436 from azat/prewhere-filter-fix
...
Fix possible incorrect result with SimpleAggregateFunction in PREWHERE and FINAL
2023-09-24 20:05:06 +03:00
Nikolay Degterinsky
ff66d29376
Merge pull request #51469 from frinkr/perf-huge-ast
...
Improve performace for huge ast by direct-writing the column name for ASTLiteral
2023-09-24 14:56:50 +02:00
Azat Khuzhin
907d385df4
Resubmit 01051_system_stack_trace without flakiness (change max_block_size)
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-09-24 14:01:24 +02:00
Azat Khuzhin
7a761730fa
Respect max_block_size while reading form system.stack_trace
...
Reading from system.stack_trace can be very slow, especially if you read
all columns (there are some optimizations to avoid doing some actions),
that requires:
- reading /proc/self/task
- reading /proc/self/task/*/comm
- sending signal to each of the thread (to read query_id and trace_id)
And even if you have some conditions (for which there are some
optimizations, i.e. not sending signal to the thread which is the
slowest operation under load) it will still send signals to every thread
and wait for result.
This patch implements reading from system.stack_trace with respect to
max_block_size, that will make queries with lower max_block_size and
LIMIT works significantly faster.
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-09-24 14:01:24 +02:00
Azat Khuzhin
01d22805ef
Remove indent for anonymous namespace
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-09-24 14:01:24 +02:00
Azat Khuzhin
e0bca06a5d
Add some logging for preparing rows for system.stack_trace
...
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
2023-09-24 14:00:43 +02:00
Nikolay Degterinsky
256a699f43
Merge remote-tracking branch 'upstream/master' into perf-huge-ast
2023-09-24 00:29:03 +00:00
Alexey Milovidov
776c6adfe6
Merge pull request #54553 from Avogar/better-types-inference
...
Better integer types inference for Int64/UInt64 fields
2023-09-24 02:07:48 +03:00
Alexey Milovidov
e96dde24d3
Merge pull request #54951 from ClickHouse/remove-test-system-stack-trace
...
Remove test `01051_system_stack_trace`
2023-09-24 02:06:15 +03:00
Alexey Milovidov
b0d76b0028
Remove test 01051_system_stack_trace
2023-09-24 01:05:27 +02:00
Alexey Milovidov
b8b3c674f0
Merge pull request #54769 from Avogar/fix-timer-descriptor
...
Don't use default move assignment in TimerDescriptor
2023-09-24 02:03:08 +03:00
robot-clickhouse
320e4c47f3
Merge pull request #54943 from amosbird/fix-54941
...
Rebuild minmax_count_projection when partition key gets modified
2023-09-23 22:11:52 +02:00
robot-clickhouse-ci-2
2a26557391
Merge pull request #54399 from vahpetr/fix-nats-high-cpu-usage
...
Fix NATS high cpu usage
2023-09-23 21:36:21 +02:00
robot-clickhouse-ci-2
f51cf202e3
Merge pull request #54240 from wangtZJU/fix_multi_join_rewrite
...
fix name clash for multiple join rewriter v2
2023-09-23 21:35:46 +02:00
Alexey Milovidov
664ac27cf2
Merge pull request #54507 from ClickHouse/flush-logs-for-system-backup-logs-test
...
Flush logs for system.backup_log test.
2023-09-23 22:33:21 +03:00
robot-ch-test-poll4
9d61ed4665
Merge pull request #54664 from bigo-sg/arrow_join_max_block_size
...
Respect max_block_size for array join to avoid possible OOM
2023-09-23 21:30:51 +02:00
Sergei Trifonov
c1489d52b7
Merge pull request #54618 from ClickHouse/io-scheduling-throttler
...
add IO scheduling node to limit bandwidth
2023-09-23 21:26:17 +02:00
Alexey Milovidov
e89a8e4d13
Merge pull request #53492 from ClickHouse/fix-prewhere-lost-column
...
Fix: moved to prewhere condition actions can lose column
2023-09-23 22:24:00 +03:00
Alexey Milovidov
06415c7a53
Merge pull request #52082 from JackyWoo/rewrite_move_functions_out_of_any
2023-09-23 22:22:45 +03:00
Alexey Milovidov
cf080677bf
Simplify code
2023-09-23 22:22:27 +03:00
Azat Khuzhin
24c0d53df7
Fix possible incorrect result with SimpleAggregateFunction in PREWHERE and FINAL
...
In case of FINAL the result of the expression for PREWHERE can be
changed after applying merge algorithm, and this is the problem for
SimpleAggregateFunction since after applying merging algorithm the value
can be changed.
Note, analyzer does not has this bug because it simply does not reuse
columns from PREWHERE (they does not passed via
GlobalPlannerContext::createColumnIdentifier())
Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
v2: update tests references (see https://s3.amazonaws.com/clickhouse-test-reports/54436/baaa688f40fcd064952f62dc8c62ddc752dd0046/fast_test.html )
v3: allow reusing expression from PREWHERE w/o FINAL and revert tests references changes
2023-09-23 20:55:06 +02:00
Alexey Milovidov
c4948efae2
Merge pull request #54938 from ClibMouse/ipv4_read_big_endian
...
Ipv4 read big endian
2023-09-23 15:41:24 +03:00
Alexey Milovidov
a751f51ec8
Merge pull request #54942 from ClickHouse/binary-like
...
Allow LIKE over binary data
2023-09-23 15:37:19 +03:00
serxa
44acb53ad3
Merge branch 'master' into io-scheduling-throttler
2023-09-23 10:51:18 +00:00
Sergei Trifonov
4032fc17bb
Merge pull request #54780 from ucasfl/comment
...
update comment
2023-09-23 12:48:48 +02:00
Amos Bird
81804ce9ba
Rebuild minmax_count_projection when partition key gets modified
2023-09-23 17:59:06 +08:00
robot-ch-test-poll2
4f037c2504
Merge pull request #54928 from arenadata/ADQM-1230
...
Fix data race during BackupsWorker::backup_log initialization
2023-09-23 04:56:12 +02:00
Alexey Milovidov
1326bffe60
Allow LIKE over binary data
2023-09-23 04:14:03 +02:00
robot-ch-test-poll4
ba6f0431a5
Merge pull request #54933 from ClibMouse/feature/big-endian-bson-each-row
...
Provide support for BSON on BE
2023-09-23 03:00:27 +02:00
robot-ch-test-poll2
3c93a939a2
Merge pull request #54936 from ClickHouse/pufit/s3-yet-another-num-streams-adjustment
...
Set a minimum limit of `num_streams` in StorageS3
2023-09-23 02:59:50 +02:00
robot-clickhouse-ci-2
d98234dc9d
Merge pull request #54803 from Avogar/ephemeral-columns-from-files
...
Forbid special columns for file/s3/url/... storages, fix insert into ephemeral columns from files
2023-09-22 23:24:42 +02:00
Alexey Milovidov
783d1873b2
Merge pull request #54839 from rschu1ze/vector-search-test-refactoring
...
Refactor and split up vector search tests
2023-09-23 00:10:47 +03:00
robot-ch-test-poll3
1334202af4
Merge pull request #54863 from zvonand/zvonand-refactor-globs
...
Refactor and simplify multi-directory globs
2023-09-22 23:09:05 +02:00
robot-ch-test-poll2
291e4ca114
Merge pull request #54924 from cclauss/patch-1
...
Update CHANGELOG.md: Fix typos to test #54914
2023-09-22 22:01:37 +02:00
Suzy Wang
51bc09d347
big endian
2023-09-22 12:48:31 -07:00