Skip to content

Commit f1f1ee0

Browse files
Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-inconsistent-formatting-except
2 parents aa340cc + 27b618f commit f1f1ee0

File tree

154 files changed

+7031
-954
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

154 files changed

+7031
-954
lines changed

base/base/Decimal.h

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ namespace DB
1010
{
1111
template <class> struct Decimal;
1212
class DateTime64;
13+
class Time64;
1314

1415
#define FOR_EACH_UNDERLYING_DECIMAL_TYPE(M) \
1516
M(Int32) \
@@ -142,6 +143,16 @@ class DateTime64 : public Decimal64
142143

143144
constexpr DateTime64(const Base & v): Base(v) {} // NOLINT(google-explicit-constructor)
144145
};
146+
147+
class Time64 : public Decimal64
148+
{
149+
public:
150+
using Base = Decimal64;
151+
using Base::Base;
152+
using NativeType = Base::NativeType;
153+
154+
constexpr Time64(const Base & v): Base(v) {} // NOLINT(google-explicit-constructor)
155+
};
145156
}
146157

147158
constexpr UInt64 max_uint_mask = std::numeric_limits<UInt64>::max();
@@ -173,6 +184,15 @@ namespace std
173184
}
174185
};
175186

187+
template <>
188+
struct hash<DB::Time64>
189+
{
190+
size_t operator()(const DB::Time64 & x) const
191+
{
192+
return std::hash<DB::Time64::NativeType>()(x);
193+
}
194+
};
195+
176196
template <>
177197
struct hash<DB::Decimal256>
178198
{

base/base/Decimal_fwd.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,16 @@ using Decimal128 = Decimal<Int128>;
2727
using Decimal256 = Decimal<Int256>;
2828

2929
class DateTime64;
30+
class Time64;
3031

3132
template <class T>
3233
concept is_decimal =
3334
std::is_same_v<T, Decimal32>
3435
|| std::is_same_v<T, Decimal64>
3536
|| std::is_same_v<T, Decimal128>
3637
|| std::is_same_v<T, Decimal256>
37-
|| std::is_same_v<T, DateTime64>;
38+
|| std::is_same_v<T, DateTime64>
39+
|| std::is_same_v<T, Time64>;
3840

3941
template <class T>
4042
concept is_over_big_int =

base/base/TypeName.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ TN_MAP(Decimal64)
4444
TN_MAP(Decimal128)
4545
TN_MAP(Decimal256)
4646
TN_MAP(DateTime64)
47+
TN_MAP(Time64)
4748
TN_MAP(Array)
4849
TN_MAP(Tuple)
4950
TN_MAP(Map)

base/base/extended_types.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ template <typename T> concept is_floating_point =
7474
M(DataTypeDate) \
7575
M(DataTypeDate32) \
7676
M(DataTypeDateTime) \
77+
M(DataTypeTime) \
7778
M(DataTypeInt8) \
7879
M(DataTypeUInt8) \
7980
M(DataTypeInt16) \
@@ -94,6 +95,7 @@ template <typename T> concept is_floating_point =
9495
M(DataTypeDate, X) \
9596
M(DataTypeDate32, X) \
9697
M(DataTypeDateTime, X) \
98+
M(DataTypeTime, X) \
9799
M(DataTypeInt8, X) \
98100
M(DataTypeUInt8, X) \
99101
M(DataTypeInt16, X) \

ci/jobs/docs_job.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
Result.from_commands_run(
7878
name=testname,
7979
command=[
80-
"yarn build-api-doc",
8180
"yarn build-swagger",
8281
"export DOCUSAURUS_IGNORE_SSG_WARNINGS=true && yarn build-docs",
8382
],

ci/jobs/scripts/check_style/aspell-ignore/en/aspell-dict.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3045,6 +3045,7 @@ toStartOfYear
30453045
toString
30463046
toStringCutToZero
30473047
toTime
3048+
toTimeWithFixedDate
30483049
toTimeZone
30493050
toType
30503051
toTypeName

ci/jobs/scripts/functional_tests_results.py

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@
2626
# out = csv.writer(f, delimiter="\t")
2727
# out.writerow(status)
2828

29-
BROKEN_TESTS_ANALYZER_TECH_DEBT = [
30-
"01624_soft_constraints",
31-
]
32-
3329

3430
class FTResultsProcessor:
3531
@dataclasses.dataclass
@@ -50,7 +46,6 @@ def __init__(self, wd):
5046
self.tests_output_file = f"{wd}/test_result.txt"
5147
# self.test_results_parsed_file = f"{wd}/test_result.tsv"
5248
# self.status_file = f"{wd}/check_status.tsv"
53-
self.broken_tests = BROKEN_TESTS_ANALYZER_TECH_DEBT
5449

5550
def _process_test_output(self):
5651
total = 0
@@ -97,41 +92,20 @@ def _process_test_output(self):
9792

9893
total += 1
9994
if TIMEOUT_SIGN in line:
100-
if test_name in self.broken_tests:
101-
success += 1
102-
test_results.append((test_name, "BROKEN", test_time, []))
103-
else:
104-
failed += 1
105-
test_results.append((test_name, "Timeout", test_time, []))
95+
failed += 1
96+
test_results.append((test_name, "Timeout", test_time, []))
10697
elif FAIL_SIGN in line:
107-
if test_name in self.broken_tests:
108-
success += 1
109-
test_results.append((test_name, "BROKEN", test_time, []))
110-
else:
111-
failed += 1
112-
test_results.append((test_name, "FAIL", test_time, []))
98+
failed += 1
99+
test_results.append((test_name, "FAIL", test_time, []))
113100
elif UNKNOWN_SIGN in line:
114101
unknown += 1
115102
test_results.append((test_name, "FAIL", test_time, []))
116103
elif SKIPPED_SIGN in line:
117104
skipped += 1
118105
test_results.append((test_name, "SKIPPED", test_time, []))
119106
else:
120-
if OK_SIGN in line and test_name in self.broken_tests:
121-
skipped += 1
122-
test_results.append(
123-
(
124-
test_name,
125-
"NOT_FAILED",
126-
test_time,
127-
[
128-
"This test passed. Update analyzer_tech_debt.txt.\n"
129-
],
130-
)
131-
)
132-
else:
133-
success += int(OK_SIGN in line)
134-
test_results.append((test_name, "OK", test_time, []))
107+
success += int(OK_SIGN in line)
108+
test_results.append((test_name, "OK", test_time, []))
135109
test_end = False
136110
elif (
137111
len(test_results) > 0

docs/en/engines/table-engines/mergetree-family/summingmergetree.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: 'SummingMergeTree'
99

1010
# SummingMergeTree
1111

12-
The engine inherits from [MergeTree](/engines/table-engines/mergetree-family/versionedcollapsingmergetree). The difference is that when merging data parts for `SummingMergeTree` tables ClickHouse replaces all the rows with the same primary key (or more accurately, with the same [sorting key](../../../engines/table-engines/mergetree-family/mergetree.md)) with one row which contains summarized values for the columns with the numeric data type. If the sorting key is composed in a way that a single key value corresponds to large number of rows, this significantly reduces storage volume and speeds up data selection.
12+
The engine inherits from [MergeTree](/engines/table-engines/mergetree-family/versionedcollapsingmergetree). The difference is that when merging data parts for `SummingMergeTree` tables ClickHouse replaces all the rows with the same primary key (or more accurately, with the same [sorting key](../../../engines/table-engines/mergetree-family/mergetree.md)) with one row which contains summed values for the columns with the numeric data type. If the sorting key is composed in a way that a single key value corresponds to large number of rows, this significantly reduces storage volume and speeds up data selection.
1313

1414
We recommend using the engine together with `MergeTree`. Store complete data in `MergeTree` table, and use `SummingMergeTree` for aggregated data storing, for example, when preparing reports. Such an approach will prevent you from losing valuable data due to an incorrectly composed primary key.
1515

@@ -34,7 +34,7 @@ For a description of request parameters, see [request description](../../../sql-
3434

3535
#### columns {#columns}
3636

37-
`columns` - a tuple with the names of columns where values will be summarized. Optional parameter.
37+
`columns` - a tuple with the names of columns where values will be summed. Optional parameter.
3838
The columns must be of a numeric type and must not be in the partition or sorting key.
3939

4040
If `columns` is not specified, ClickHouse summarizes the values in all columns with a numeric data type that are not in the sorting key.
@@ -62,7 +62,7 @@ CREATE TABLE [IF NOT EXISTS] [db.]table_name [ON CLUSTER cluster]
6262

6363
All of the parameters excepting `columns` have the same meaning as in `MergeTree`.
6464

65-
- `columns` — tuple with names of columns values of which will be summarized. Optional parameter. For a description, see the text above.
65+
- `columns` — tuple with names of columns values of which will be summed. Optional parameter. For a description, see the text above.
6666

6767
</details>
6868

@@ -107,13 +107,13 @@ ClickHouse can merge the data parts so that different resulting parts of data ca
107107

108108
### Common Rules for Summation {#common-rules-for-summation}
109109

110-
The values in the columns with the numeric data type are summarized. The set of columns is defined by the parameter `columns`.
110+
The values in the columns with the numeric data type are summed. The set of columns is defined by the parameter `columns`.
111111

112112
If the values were 0 in all of the columns for summation, the row is deleted.
113113

114-
If column is not in the primary key and is not summarized, an arbitrary value is selected from the existing ones.
114+
If column is not in the primary key and is not summed, an arbitrary value is selected from the existing ones.
115115

116-
The values are not summarized for columns in the primary key.
116+
The values are not summed for columns in the primary key.
117117

118118
### The Summation in the Aggregatefunction Columns {#the-summation-in-the-aggregatefunction-columns}
119119

docs/en/interfaces/third-party/client-libraries.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ ClickHouse Inc does **not** maintain the libraries listed below and hasn't done
2828
- [SeasClick C++ client](https://github.com/SeasX/SeasClick)
2929
- [one-ck](https://github.com/lizhichao/one-ck)
3030
- [glushkovds/phpclickhouse-laravel](https://packagist.org/packages/glushkovds/phpclickhouse-laravel)
31+
- [glushkovds/php-clickhouse-schema-builder](https://packagist.org/packages/glushkovds/php-clickhouse-schema-builder)
3132
- [kolya7k ClickHouse PHP extension](https://github.com//kolya7k/clickhouse-php)
3233
- [hyvor/clickhouse-php](https://github.com/hyvor/clickhouse-php)
3334
### Go {#go}

docs/en/operations/system-tables/error_log.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: 'System table containing the history of error values from table `system.errors`,
33
periodically flushed to disk.'
44
keywords: ['system table', 'error_log']
5-
slug: /operations/system-tables/error_log
5+
slug: /operations/system-tables/system-error-log
66
title: 'system.error_log'
77
---
88

0 commit comments

Comments
 (0)