Alexey Milovidov
43bd37b6cc
Fix style
2021-05-04 02:46:11 +03:00
Alexey Milovidov
02ce9cc725
Untangle UUID
2021-05-04 01:46:51 +03:00
Alexey Milovidov
2375b0503f
Add comment
2021-05-03 23:08:56 +03:00
Alexey Milovidov
0677787d90
Fix abysmally low performance
2021-05-03 22:56:40 +03:00
Alexey Milovidov
eaa8f922b2
Fix errors, add a test
2021-05-03 00:52:59 +03:00
Azat Khuzhin
5ff78fb297
replxx readline compatibility
...
- By default M-BACKSPACE is KILL_TO_WHITESPACE_ON_LEFT, while in
readline it is backward-kill-word, so use KILL_TO_BEGINING_OF_WORD
instead.
- By default C-w is KILL_TO_BEGINING_OF_WORD, while in readline it is
unix-word-rubout, so use KILL_TO_WHITESPACE_ON_LEFT instead.
2021-05-02 23:26:42 +03:00
Alexey Milovidov
1fda866881
Merge branch 'master' into normalize-bigint
2021-05-02 21:24:45 +03:00
alexey-milovidov
37f44ca7e8
Merge pull request #23776 from ClickHouse/pvs-workaround
...
Workaround for PVS-Studio
2021-05-01 11:58:50 +03:00
Maksim Kita
9c808c4944
Merge pull request #23786 from kitaisreal/add-examples-folder-filter-to-ya-make-in
...
Add examples folder filter to ya.make.in
2021-04-30 15:27:54 +03:00
Maksim Kita
318c4bb80d
Add examples folder filter to ya.make.in
2021-04-30 11:25:52 +03:00
Alexey Milovidov
631711194b
Workaround for PVS-Studio
2021-04-29 22:51:59 +03:00
Benjamin Naecker
57fd59b73b
Adds support for building on Solaris-derived systems
...
This commit adds a number of changes to platform-detection and
compile-time directives required to support building ClickHouse on
Solaris-derived systems, most notably illumos.
2021-04-28 16:32:41 -07:00
Alexey Milovidov
649550c5ab
Attempt to normalize big integers
2021-04-25 12:30:43 +03:00
Alexey Milovidov
8f01af62d9
Merge branch 'master' into normalize-bigint
2021-04-25 06:57:44 +03:00
Alexey Milovidov
4ff812db7f
Maybe better support for paths with whitespaces
2021-04-24 22:47:52 +03:00
Azat Khuzhin
2561a67fd8
Replace !__clang__ with !defined(__clang) to fix gcc builds
...
$ gg 'if !__clang__' | cut -d: -f1 | sort -u | xargs sed -i 's/#if !__clang__/#if !defined(__clang__)/g'
2021-04-18 23:37:50 +03:00
changvvb
4eee2d0977
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into support-apple-m1
2021-04-15 22:54:26 +08:00
Maksim Kita
0cfe018fd4
Moved BorrowedObjectPool to common
2021-04-13 23:15:22 +03:00
changvvb
1f8bd034a3
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into support-apple-m1
2021-04-06 15:55:03 +08:00
Alexey Milovidov
7589a014f9
Better fix
2021-04-01 03:44:02 +03:00
Alexey Milovidov
de3b452d7a
Remove useless code from setTerminalEcho #20334
2021-03-30 00:39:38 +03:00
Alexey Milovidov
b005081103
Update libdivide to the latest master (2)
2021-03-30 00:37:27 +03:00
Maksim Kita
6fb444f732
Merge pull request #20184 from nvartolomei/nv/macos-shared
...
Fix macOS shared lib build
2021-03-29 18:25:43 +03:00
Alexey Milovidov
7fcae60466
Merge branch 'master' into to-start-of-interval-hour-align
2021-03-29 05:42:00 +03:00
changvvb
5e07551d17
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into support-apple-m1
2021-03-26 16:57:26 +08:00
Alexey Milovidov
ea3cf5c0a7
Fix typo
2021-03-24 22:48:39 +03:00
Alexey Milovidov
b610afe771
Another fix
2021-03-24 22:40:45 +03:00
Alexey Milovidov
5a2f2e0cc8
Change behaviour of toStartOfInterval
in backward incompatible way
2021-03-24 01:53:19 +03:00
Alexey Milovidov
3952a8e976
Fix UBSan report in addMonths
2021-03-22 23:42:09 +03:00
changvvb
b4e92f6b12
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into support-apple-m1
2021-03-19 13:52:09 +08:00
Alexey Milovidov
de091114f3
Fix UBSan report
2021-03-16 15:22:52 +03:00
Alexey Milovidov
eadf0248d0
Build fixes
2021-03-16 14:07:53 +03:00
changvvb
bba600d558
Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into support-apple-m1
2021-03-16 13:26:00 +08:00
Alexey Milovidov
f48bf2aaba
Fix issue
2021-03-15 23:29:35 +03:00
Alexey Milovidov
671395e8c8
Most likely improve performance
2021-03-15 22:23:27 +03:00
Alexey Milovidov
845f4afbf4
Fix parsing of pre-epoch time
2021-03-15 21:09:05 +03:00
Alexey Milovidov
badd5165da
Fix UBSan report in rounding to years intervals
2021-03-15 20:36:49 +03:00
alexey-milovidov
53e21443eb
Merge branch 'master' into DateTime64_extended_range
2021-03-14 12:27:17 +03:00
Alexey Milovidov
e8919c49fb
Merge branch 'master' into replace-memcpy
2021-03-13 09:39:58 +03:00
Nikita Mikhaylov
e234990cf6
Merge pull request #19257 from nikitamikhaylov/geometry_functions
...
Merging geometry functions
2021-03-12 17:05:24 +03:00
changvvb
fcb238715b
Support apple m1
2021-03-12 01:12:52 +08:00
Nikita Mikhailov
e78fc3109c
better ubsan testing
2021-03-11 15:08:18 +03:00
Yatsishin Ilya
7b69ef92be
gcc old cast check failed
2021-03-10 18:04:34 +03:00
Yatsishin Ilya
71d745b4ec
implicit const conversion
2021-03-09 17:31:54 +03:00
Alexey Milovidov
1200d9d9c5
Range checks and monotonicity
2021-03-07 10:10:37 +03:00
Alexey Milovidov
7052ecd446
Fix error
2021-03-07 09:30:52 +03:00
Alexey Milovidov
1bb62f578b
Unit tests passing
2021-03-07 04:10:38 +03:00
Alexey Milovidov
8271cec093
Fix error
2021-03-07 02:36:24 +03:00
Alexey Milovidov
d406999e8f
Remove debug output
2021-03-07 01:36:48 +03:00
Alexey Milovidov
0dbadc8d8e
Fix error
2021-03-07 01:35:23 +03:00
Alexey Milovidov
8d5d1b76fb
Fix error
2021-03-07 00:36:29 +03:00
Alexey Milovidov
d276fac135
Support negative time_t in more functions
2021-03-05 05:04:23 +03:00
Alexey Milovidov
738d106874
Support negative time_t in more functions
2021-03-05 05:03:55 +03:00
Alexey Milovidov
ecee81b714
Fix clang-tidy
2021-03-05 04:50:16 +03:00
Alexey Milovidov
790aa8697c
Fix typos
2021-03-05 04:47:50 +03:00
Alexey Milovidov
1722978c2b
Comments and corrections
2021-03-05 04:45:12 +03:00
Alexey Milovidov
7cc471f9b9
Simplify code
2021-03-05 04:22:12 +03:00
Alexey Milovidov
ed492ccf5d
Fix Africa/Juba
2021-03-04 05:36:36 +03:00
Alexey Milovidov
b9a8509f79
Adjustments
2021-03-04 05:18:17 +03:00
Alexey Milovidov
31010624d6
Attempt to simplify code
2021-03-04 03:35:23 +03:00
Alexey Milovidov
4f08539754
Remove strange code
2021-03-04 03:01:08 +03:00
Alexey Milovidov
1096fc328a
Make some tests automated
2021-03-04 02:11:27 +03:00
Alexey Milovidov
ffc39574f1
Removed very old example (for jemalloc performance regression)
2021-03-04 02:04:01 +03:00
Alexey Milovidov
2632b568ae
Move tests to appropriate place
2021-03-04 01:34:30 +03:00
Alexey Milovidov
51d51e4748
Return private
2021-03-04 00:44:58 +03:00
Alexey Milovidov
fdc00beb77
Whitespaces
2021-03-03 23:56:59 +03:00
Alexey Milovidov
6f5877abdf
Fix build after merge with master
2021-03-03 23:53:52 +03:00
Alexey Milovidov
4e8239e098
Merge branch 'master' into DateTime64_extended_range
2021-03-03 23:43:20 +03:00
Alexey Milovidov
b1b3db09d7
Remove commented out code
2021-03-03 23:34:15 +03:00
Alexey Milovidov
ed0099a113
Maybe unused condition
2021-03-03 23:24:56 +03:00
Alexey Milovidov
aaef0c5ebd
Fix build
2021-03-03 23:19:26 +03:00
Alexey Milovidov
cf0912ba02
Remove unused field
2021-03-03 23:14:33 +03:00
alexey-milovidov
3e19f4a00f
Update DateLUTImpl.h
2021-03-03 23:09:59 +03:00
alexey-milovidov
0889e0da87
Update DateLUTImpl.h
2021-03-03 22:52:07 +03:00
alexey-milovidov
2f23f1b123
Update DateLUTImpl.h
2021-03-03 22:49:20 +03:00
alexey-milovidov
80c17d5537
Update DateLUTImpl.cpp
2021-03-03 22:41:10 +03:00
alexey-milovidov
e412bcb490
Update DateLUTImpl.cpp
2021-03-03 22:30:12 +03:00
alexey-milovidov
04672a4365
Update DateLUTImpl.cpp
2021-03-03 22:29:26 +03:00
Alexey Milovidov
50c62c3b4c
Add memcpy implementation from @jart
2021-03-02 22:12:30 +03:00
alexey-milovidov
3bd180c416
Merge pull request #20149 from keen-wolf/timezone_about
...
fix toMinute function to handle special timezone
2021-02-28 21:53:51 +03:00
keenwolf
303c389b36
change the time_t to unsigned to handle properly the start date of 1970-01-01
2021-02-28 18:11:54 +08:00
alexey-milovidov
d5757c67e6
Update DateLUTImpl.h
2021-02-24 17:09:27 +02:00
alexey-milovidov
b8b916008c
Update DateLUTImpl.h
2021-02-24 17:09:27 +02:00
Vasily Nemkov
d321c13cbf
Fixed special build
2021-02-24 17:08:43 +02:00
Vasily Nemkov
7a53daaefd
Fixed issues reported by PVS-Studio and Clang11/GCC10
2021-02-24 17:08:43 +02:00
Vasily Nemkov
4fcc23ec9a
Fixed build for GCC-10
2021-02-24 17:08:43 +02:00
Vasily Nemkov
2d03d330bc
Extended range of DateTime64 to years 1925 - 2238
...
The Year 1925 is a starting point because most of the timezones
switched to saner (mostly 15-minutes based) offsets somewhere
during 1924 or before. And that significantly simplifies implementation.
2238 is to simplify arithmetics for sanitizing LUT index access;
there are less than 0x1ffff days from 1925.
* Extended DateLUTImpl internal LUT to 0x1ffff items, some of which
represent negative (pre-1970) time values.
As a collateral benefit, Date now correctly supports dates up to 2149
(instead of 2106).
* Added a new strong typedef ExtendedDayNum, which represents dates
pre-1970 and post 2149.
* Functions that used to return DayNum now return ExtendedDayNum.
* Refactored DateLUTImpl to untie DayNum from the dual role of being
a value and an index (due to negative time). Index is now a different
type LUTIndex with explicit conversion functions from DatNum, time_t,
and ExtendedDayNum.
* Updated DateLUTImpl to properly support values close to epoch start
(1970-01-01 00:00), including negative ones.
* Reduced resolution of DateLUTImpl::Values::time_at_offset_change
to multiple of 15-minutes to allow storing 64-bits of time_t in
DateLUTImpl::Value while keeping same size.
* Minor performance updates to DateLUTImpl when building month LUT
by skipping non-start-of-month days.
* Fixed extractTimeZoneFromFunctionArguments to work correctly
with DateTime64.
* New unit-tests and stateless integration tests for both DateTime
and DateTime64.
2021-02-24 17:08:35 +02:00
Azat Khuzhin
810023a65c
Do not undefine __has_feature (may break c++ headers)
...
If the order of <common/defines.h> and c++ header will be wrong the
compilation will be broken.
v2: rename __ch_has_feature to ch_has_feature to fix -Wreserved-id-macro
v3: do not fallback to 0
2021-02-23 19:46:47 +03:00
Azat Khuzhin
8ab578065a
Fix __has_feature macros under gcc
...
__has_feature supported only by clang.
But libcxx/libcxxabi overrides it to 0:
$ fgrep -r 'define __has_feature' contrib/libcxx*
contrib/libcxx/include/__config:#define __has_feature(__x) 0
contrib/libcxxabi/src/demangle/DemangleConfig.h:#define __has_feature(x) 0
Thus the checks for __has_feature will be wrong, undefine it again to
avoid such issues.
This will also fix building with sanitizers under gcc (before this patch
BOOST_USE_UCONTEXT wasn't set for sanitizers).
2021-02-23 19:39:34 +03:00
Alexey Milovidov
d2a9e5842a
Fix wrong formatting of overflowed DateTime64
2021-02-21 21:01:46 +03:00
Alexey Milovidov
9cb972e9ed
Fix UBSan report in Decimal arithmetic #19432
2021-02-21 13:23:18 +03:00
Alexey Milovidov
c760d5224d
Suppress UBSan report in Decimal comparison
2021-02-13 03:56:38 +03:00
Alexey Milovidov
1546f5bcb9
Suppress UBSan report in Decimal comparison
2021-02-13 03:54:38 +03:00
Nicolae Vartolomei
479b45d772
Fix linker flags for shared linking on macOS
...
This combination now works: `-DUSE_STATIC_LIBRARIES=0 -DSPLIT_SHARED_LIBRARIES=1`.
Without `SPLIT_SHARED_LIBRARIES` it is still failing.
2021-02-07 14:58:52 +00:00
keenwolf
610798aa48
fix the toMinute bug which will cause toDateTime or toString printing wrong time
2021-02-06 15:32:49 +08:00
alexey-milovidov
867f5a8975
Merge pull request #20029 from ClickHouse/remove-useless-code-5
...
Remove useless code
2021-02-03 21:06:43 +03:00
Nikolai Kochetov
c39c965612
Merge pull request #19962 from keen-wolf/timezoneOffset
...
Implement the timezoneOffset function
2021-02-03 20:37:34 +03:00
Alexey Milovidov
02da869d10
Remove useless code
2021-02-03 12:46:41 +03:00
Alexey Milovidov
191389d040
Fix some of the issues found by Coverity
2021-02-02 22:08:32 +03:00
Alexey Milovidov
12485eee6b
Fix some of the issues found by Coverity
2021-02-02 22:07:23 +03:00
keenwolf
9beb7689cc
add comments and update test cases.
2021-02-02 23:35:45 +08:00
keenwolf
d251807ea4
add function timezoneOffset
2021-02-02 11:01:20 +08:00
Alexey Milovidov
eb0473c3f9
Fix UBSan report in "round"
2021-01-29 04:03:38 +03:00
Maksim Kita
bd81f43ecb
Merge pull request #19672 from ClickHouse/bigint-remove-old-code
...
Remove old code for BigInt.
2021-01-27 11:28:45 +03:00
Alexey Milovidov
093108bf81
Normalize BigInt implementation
2021-01-27 03:54:57 +03:00
Alexey Milovidov
f3929b151a
Remove even more code
2021-01-26 22:04:03 +03:00
Azat Khuzhin
f4a4d33c2d
Suppress UBsan reports in addYears()
...
https://clickhouse-test-reports.s3.yandex.net/19528/1c364b6ee3a44487529954cf2792e615f7de0f82/fuzzer_ubsan/report.html#fail1
2021-01-26 01:12:40 +03:00
tavplubix
9fc1eba0bc
Update DateLUTImpl.h
2021-01-25 12:40:49 +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
cb30a02540
Fix UBsan report in addDays(INT64_MAX)
...
https://clickhouse-test-reports.s3.yandex.net/19466/df53438a66ee95de790b60d35f36eca986590027/fuzzer_ubsan/report.html#fail1
2021-01-24 13:51:05 +03:00
Alexey Milovidov
505898747e
Fix buffer overflow in DateLUT
2021-01-23 01:58:41 +03:00
Alexey Milovidov
4968f1733e
Annotations for DateLUT
2021-01-21 15:01:24 +03:00
hexiaoting
a2e5f7693a
Fix condition error
2020-12-30 11:20:38 +08:00
hexiaoting
ccaea5fa42
Make Date > 2106-02-07 overflow as 0
2020-12-28 19:09:41 +08:00
Nikolai Kochetov
8ffadac2a3
Try disable ucontect for arcadia
2020-12-23 19:49:36 +03:00
Nikolai Kochetov
e56a1c442c
Use ucontext fir arcadia build.
2020-12-23 18:20:52 +03:00
Nikolai Kochetov
af7f5c9518
Merge pull request #17868 from ClickHouse/async-read-from-socket
...
Async read from socket
2020-12-23 12:20:42 +03:00
alexey-milovidov
f0dc3ec152
Merge pull request #17665 from amosbird/clientedit
...
clickhouse-client editor
2020-12-22 09:53:54 +03:00
Amos Bird
fe16aec48b
add .sql suffix
2020-12-21 14:43:06 +08:00
Amos Bird
0d89e4aac6
correct write
2020-12-21 14:43:06 +08:00
Amos Bird
86aa155e62
Cleaner
2020-12-21 14:43:05 +08:00
Amos Bird
a3d52dd6a0
Don't shallow errors.
2020-12-21 14:43:05 +08:00
Amos Bird
91e8b35977
clickhouse-client editor
2020-12-21 14:43:05 +08:00
alexey-milovidov
b932b984a0
Update wide_integer_impl.h
2020-12-21 04:02:49 +03:00
Alexey Milovidov
a159fc0a90
Merge branch 'master' into ucasFL-fix
2020-12-20 22:29:43 +03:00
alexey-milovidov
55ed2ab563
Update wide_integer_impl.h
2020-12-20 09:46:43 +03:00
Amos Bird
c447628d42
Add connection thread metrics
2020-12-18 15:22:55 +08:00
alexey-milovidov
6ee2ada592
Merge pull request #18204 from ClickHouse/remove-strerror
...
Do not use non thread-safe function `strerror`
2020-12-18 08:07:46 +03:00
Alexey Milovidov
fb3d235e84
Do not use strerror
2020-12-17 21:25:12 +03:00
Maksim Kita
fd7fe0f84c
Updated ya.make
2020-12-17 12:10:46 +03:00
Maksim Kita
685099af7f
Move getPageSize in common
2020-12-17 00:23:41 +03:00
Nikolai Kochetov
af83d82a84
Try use tsan annotated boost fibre.
2020-12-16 20:06:04 +03:00
alexey-milovidov
0d7e27d93f
Merge branch 'master' into fix
2020-12-14 23:02:14 +03:00
Nikolai Kochetov
8de5cd5bc7
Merge branch 'master' into async-read-from-socket
2020-12-14 17:45:38 +03:00
Nikolai Kochetov
e295dfe6e3
Use ucontext for asan
2020-12-14 17:42:08 +03:00
Amos Bird
88341fec82
client SIGWINCH fix
2020-12-12 00:34:40 +08:00
PHO
d014ac4ce2
Provide a default constructor for wide::integer
...
The implicit one provided by compiler does not initialize its member
variable "items" because it's a POD array. GCC emits a warning about this.
2020-12-07 16:00:32 +03:00
fenglv
ff4ffd2c6d
Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix
2020-12-07 04:39:49 +00:00
Ivan
315ff4f0d9
ANTLR4 Grammar for ClickHouse and new parser ( #11298 )
2020-12-04 05:15:44 +03:00
Ilya Yatsishin
9b72323594
Try fix arcadia build ( #17720 )
...
* Try fix arcadia build
* fix
2020-12-02 17:54:52 +03:00
Yuriy Chernyshov
a6e66fc3b5
Use feature testing macro to test if char8_t is supported
2020-11-30 22:36:30 +03:00
alexey-milovidov
81e4885664
Merge pull request #17556 from ClickHouse/memory-amount-worse
...
getMemoryAmount: make code worse
2020-11-30 12:53:50 +03:00
Alexey Milovidov
f80ae936ad
Fix parsing of multiline queries in interactive mode #13654
2020-11-29 17:50:42 +03:00
Alexey Milovidov
7627f4f371
getMemoryAmount: make code worse
2020-11-29 15:13:10 +03:00
fenglv
5c5d72379a
Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix
2020-11-28 03:38:29 +00:00
alexey-milovidov
d3b10c91f0
Update wide_integer_impl.h
2020-11-26 08:03:54 +03:00
Alexander Tokmakov
60a5782c75
fix AST formatting in log messages
2020-11-22 20:23:12 +03:00
fenglv
615287ae75
Avoid bigint_cast stack overflow
2020-11-22 03:42:16 +00:00
Matwey V. Kornilov
9d509cfc56
Add missed <stdexcept>
...
std::logic_error is used at line 294, so the appropriate header is required.
2020-11-21 13:26:38 +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