Commit Graph

4019 Commits

Author SHA1 Message Date
Alexander Kuzmenkov
d8f9a8d3cd first_value and last_value 2021-02-11 18:41:54 +03:00
Alexander Kuzmenkov
ecbcf47f28 lag/lead stubs + cleanup 2021-02-11 18:07:42 +03:00
Alexander Kuzmenkov
525400bc41 window function rank() and friends 2021-02-11 16:29:30 +03:00
Alexander Kuzmenkov
363007b964 fixes 2021-02-11 11:39:39 +03:00
Alexander Kuzmenkov
38678ff484 Merge remote-tracking branch 'origin/master' into HEAD 2021-02-11 10:40:05 +03:00
Alexander Kuzmenkov
2571dac984
Merge pull request #20111 from ClickHouse/aku/window-prototype
RANGE OFFSET window frame
2021-02-11 10:39:21 +03:00
Vladimir Ch
73a0e2961b
Merge pull request #20175 from amosbird/countrewrite 2021-02-11 09:38:12 +03:00
alexey-milovidov
e33477a16e
Merge pull request #20282 from ClickHouse/dont_allow_ttl_for_old_syntax
Don't allow TTL in old syntax
2021-02-11 00:46:30 +03:00
Ivan
be831d09f7
Update Pytest check (#18972)
* [WIP]

* Update skip-list

* Update ci_config.json

* Do not sync inserts for test

* Fix more tests

* Fix another test

* Enable one more test

* More fixed tests

* More test fixes

* Do not absolutize server path for now

* More test fixes

* Unset CLICKHOUSE_LOG_COMMENT where necessary

* Remove debugging set -e

* Fix more tests

* Fix test reference

* Fix style check
2021-02-10 21:09:13 +03:00
Anton Popov
ece7e87cfb
Merge pull request #20079 from ClickHouse/vdimir/fix-join-used-flag
Split use flags and RowRef in HashJoin
2021-02-10 20:34:22 +03:00
Alexander Kuzmenkov
5bd9c8b122 update reference 2021-02-10 17:42:45 +03:00
Alexander Kuzmenkov
ba0cd9677c update reference 2021-02-10 16:44:00 +03:00
Alexander Kuzmenkov
e557d60cdb fixes for sort order 2021-02-10 16:27:22 +03:00
alesapin
a63d73db58 Don't allow TTL in old syntax 2021-02-10 15:09:12 +03:00
alesapin
420f2958e2
Merge pull request #19991 from ClickHouse/constant-propagation-fix
Do not use inputs which values are known constants in ActionsDAG.
2021-02-10 14:13:52 +03:00
Maksim Kita
85396fc82e
Merge pull request #20057 from rf/rf/add-deltasum
Add `deltaSum` aggregate function, docs & test
2021-02-10 13:28:48 +03:00
Amos Bird
fc6c57f8e0
Fix 2021-02-10 12:48:41 +08:00
Amos Bird
565a148da9
Normalize count() variants 2021-02-10 12:48:41 +08:00
alexey-milovidov
4ff3a28a9f
Merge pull request #20211 from amosbird/fixcte2
Fix CTE in INSERT-SELECT
2021-02-10 02:12:05 +03:00
alexey-milovidov
21b1a3fc6d
Merge pull request #20246 from ucasFL/avg-optimize
fix a problem in ArithmeticOperationsInAgrFuncOptimize
2021-02-10 02:10:15 +03:00
Vladimir Ch
a8acaafd56
Merge pull request #20223 from vdimir/fix-array-join-missing-arg
Handle syntax error for ARRAY JOIN with no args
2021-02-09 20:13:09 +03:00
Maksim Kita
a2560cecf4
Merge branch 'master' into fuse 2021-02-09 18:30:18 +03:00
Alexander Kuzmenkov
c18749a704 fix a bug and add some tests 2021-02-09 17:44:04 +03:00
feng lv
5e0095c70b fix a problem in ArithmeticOperationsInAgrFuncOptimize 2021-02-09 14:17:48 +00:00
alexey-milovidov
faf28eeff3
Merge pull request #20183 from ucasFL/avg-optimize
rewrite avg for algebraic optimization
2021-02-09 16:36:13 +03:00
Alexander Kuzmenkov
6e40b9fb6c fix for the DESC frame 2021-02-09 14:56:58 +03:00
alesapin
34cc9d5430
Update 01711_cte_subquery_fix.sql 2021-02-09 14:54:13 +03:00
vdimir
241769ee7c
Handle syntax error for ARRAY JOIN with no args 2021-02-09 11:21:26 +03:00
vdimir
79214897de
Run queries in storage join twice (issue #16991) 2021-02-09 10:33:17 +03: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
Amos Bird
46f2b4063f
Fix CTE in INSERT-SELECT 2021-02-09 00:25:24 +08:00
bharatnc
ddbcfa8b4d Tests - add to arcadia skip list 2021-02-08 07:48:50 -08:00
bharatnc
14fe627d32 Tests - accept review suggestion 2021-02-08 07:39:34 -08:00
bharatnc
6aa86fb533 PartLog - add tests for event_time_microseconds field 2021-02-08 07:29:36 -08:00
alexey-milovidov
e192676238
Merge pull request #19603 from JackyWoo/add_quota_type
add quota type QUERY_SELECTS and QUERY_INSERTS
2021-02-08 15:31:54 +03:00
tavplubix
b31891ce2b
Merge pull request #20105 from nicelulu/zookeeper_table_in_query
Supports system.zookeeper path IN query.
2021-02-08 15:01:56 +03:00
Kruglov Pavel
b256bd455c
Merge pull request #19961 from ucasFL/shard-id
add setting insert_shard_id
2021-02-08 14:28:13 +03:00
Maksim Kita
041c50c6eb
Update arcadia_skip_list.txt 2021-02-08 11:36:08 +03:00
feng lv
6a5a539e98 rewrite avg for algebraic optimization 2021-02-07 14:41:41 +00:00
alexey-milovidov
3b43b0a1be
Merge pull request #20131 from azat/DateTime64-fix
DateTime64 fixes
2021-02-07 16:55:28 +03:00
Amos Bird
1b32292dd0
bitmap function for all native integers 2021-02-07 11:32:54 +08:00
JackyWoo
77c0f0a0e7 add quota type QUERY_SELECTS and QUERY_INSERTS 2021-02-07 10:57:18 +08:00
Azat Khuzhin
46ff7d2ab0 Fix DateTime64 overflows 2021-02-07 02:24:31 +03:00
Alexey Milovidov
1209c02869 Fix overflow in mapPopulateSeries 2021-02-06 23:18:42 +03:00
Kruglov Pavel
d94e8624d7
Merge branch 'master' into shard-id 2021-02-06 16:48:17 +03:00
Azat Khuzhin
c4b5eed4ff Fix DateTime64 initialization (to match DateTime behaviour)
There was no specializations for toDateTime64(<numeric>), and because of
this default decimal conversion was used, however this is not enough for
DateTime/DateTime64 types, since the date may overflow and the proper
check is required (like DateTime has), and this what UBsan found [1]:

    ../src/IO/WriteHelpers.h:812:33: runtime error: index 508 out of bounds for type 'const char [201]' Received signal -3 Received signal Unknown signal (-3)

Backtrace:

    (gdb) bt
    0  LocalDateTime::LocalDateTime (this=0x7fffffff8418, year_=1970, month_=1 '\001', day_=1 '\001', hour_=2 '\002', minute_=0 '\000', second_=254 '\376') at LocalDateTime.h:83
    1  0x00000000138a5edb in DB::writeDateTimeText<(char)45, (char)58, (char)32, (char)46> (datetime64=..., scale=7, buf=..., date_lut=...) at WriteHelpers.h:852
    2  0x0000000019c379b4 in DB::DataTypeDateTime64::serializeText (this=0x7ffff5c4b0d8, column=..., row_num=0, ostr=..., settings=...) at DataTypeDateTime64.cpp:66
    3  0x0000000019d297e4 in DB::IDataType::serializeAsText (this=0x7ffff5c4b0d8, column=..., row_num=0, ostr=..., settings=...) at IDataType.cpp:387

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

Also fix CAST for DateTime64
2021-02-06 13:04:53 +03:00
Azat Khuzhin
0627ba0e36 Fix timezone argument for DateTime64
It should be marked with always const, otherwise it will bail:

    Code: 44, e.displayText() = DB::Exception: Illegal column String of time zone argument of function, must be constant string: While processing toDateTime(-1, 1, 'GMT'), Stack trace (when copying this message, always include the lines below):
2021-02-06 13:04:53 +03:00
Azat Khuzhin
f4c2048bf2 Fix toDateTime64(toDate()/toDateTime()) for DateTime64
Maybe this is even does not worth it, but at least there was code that
assume that this should work - ToDateTime64Transform in
FunctionsConversion.h.
2021-02-06 13:04:53 +03:00
alexey-milovidov
5c281bd2f1
Merge pull request #20133 from ClickHouse/fix_if_tuple
Fix if with tuple then/else arguments
2021-02-06 09:52:54 +03:00