Skip to content

Commit 7cce8bb

Browse files
Merge branch 'master' into fix-parameterized-view-except-query
2 parents 49926e1 + 8748a27 commit 7cce8bb

File tree

19,789 files changed

+1330578
-777856
lines changed

Some content is hidden

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

19,789 files changed

+1330578
-777856
lines changed

.clang-format

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,14 @@ NamespaceIndentation: None
8383
ObjCBlockIndentWidth: 4
8484
ObjCSpaceAfterProperty: true
8585
ObjCSpaceBeforeProtocolList: true
86+
PackConstructorInitializers: Never
8687
PenaltyBreakBeforeFirstCallParameter: 19
8788
PenaltyBreakComment: 300
8889
PenaltyBreakFirstLessLess: 120
8990
PenaltyBreakString: 1000
9091
PenaltyExcessCharacter: 1000000
9192
PenaltyReturnTypeOnItsOwnLine: 60
92-
RemoveBracesLLVM: true
93+
RemoveBracesLLVM: false
9394
SpaceAfterCStyleCast: false
9495
SpaceBeforeAssignmentOperators: true
9596
SpaceBeforeParens: ControlStatements

.clang-tidy

Lines changed: 121 additions & 122 deletions
Original file line numberDiff line numberDiff line change
@@ -5,128 +5,127 @@
55
# a) the new check is not controversial (this includes many checks in readability-* and google-*) or
66
# b) too noisy (checks with > 100 new warnings are considered noisy, this includes e.g. cppcoreguidelines-*).
77

8-
# TODO: Once clang(-tidy) 17 is the minimum, we can convert this list to YAML
9-
# See https://releases.llvm.org/17.0.1/tools/clang/tools/extra/docs/ReleaseNotes.html#improvements-to-clang-tidy
10-
11-
# TODO Let clang-tidy check headers in further directories
12-
# --> HeaderFilterRegex: '^.*/(src|base|programs|utils)/.*(h|hpp)$'
13-
HeaderFilterRegex: '^.*/(base)/.*(h|hpp)$'
14-
15-
Checks: '*,
16-
-abseil-*,
17-
18-
-altera-*,
19-
20-
-android-*,
21-
22-
-bugprone-assignment-in-if-condition,
23-
-bugprone-branch-clone,
24-
-bugprone-easily-swappable-parameters,
25-
-bugprone-exception-escape,
26-
-bugprone-implicit-widening-of-multiplication-result,
27-
-bugprone-narrowing-conversions,
28-
-bugprone-not-null-terminated-result,
29-
-bugprone-reserved-identifier, # useful but too slow, TODO retry when https://reviews.llvm.org/rG1c282052624f9d0bd273bde0b47b30c96699c6c7 is merged
30-
-bugprone-unchecked-optional-access,
31-
32-
-cert-dcl16-c,
33-
-cert-dcl37-c,
34-
-cert-dcl51-cpp,
35-
-cert-err58-cpp,
36-
-cert-msc32-c,
37-
-cert-msc51-cpp,
38-
-cert-oop54-cpp,
39-
-cert-oop57-cpp,
40-
41-
-clang-analyzer-unix.Malloc,
42-
43-
-cppcoreguidelines-*, # impractical in a codebase as large as ClickHouse, also slow
44-
45-
-darwin-*,
46-
47-
-fuchsia-*,
48-
49-
-google-build-using-namespace,
50-
-google-readability-braces-around-statements,
51-
-google-readability-casting,
52-
-google-readability-function-size,
53-
-google-readability-namespace-comments,
54-
-google-readability-todo,
55-
56-
-hicpp-avoid-c-arrays,
57-
-hicpp-avoid-goto,
58-
-hicpp-braces-around-statements,
59-
-hicpp-explicit-conversions,
60-
-hicpp-function-size,
61-
-hicpp-member-init,
62-
-hicpp-move-const-arg,
63-
-hicpp-multiway-paths-covered,
64-
-hicpp-named-parameter,
65-
-hicpp-no-array-decay,
66-
-hicpp-no-assembler,
67-
-hicpp-no-malloc,
68-
-hicpp-signed-bitwise,
69-
-hicpp-special-member-functions,
70-
-hicpp-uppercase-literal-suffix,
71-
-hicpp-use-auto,
72-
-hicpp-use-emplace,
73-
-hicpp-vararg,
74-
75-
-linuxkernel-*,
76-
77-
-llvm-*,
78-
79-
-llvmlibc-*,
80-
81-
-openmp-*,
82-
83-
-misc-const-correctness,
84-
-misc-include-cleaner, # useful but far too many occurrences
85-
-misc-no-recursion,
86-
-misc-non-private-member-variables-in-classes,
87-
-misc-confusable-identifiers, # useful but slooow
88-
-misc-use-anonymous-namespace,
89-
90-
-modernize-avoid-c-arrays,
91-
-modernize-concat-nested-namespaces,
92-
-modernize-macro-to-enum,
93-
-modernize-pass-by-value,
94-
-modernize-return-braced-init-list,
95-
-modernize-use-auto,
96-
-modernize-use-default-member-init,
97-
-modernize-use-emplace,
98-
-modernize-use-nodiscard,
99-
-modernize-use-override,
100-
-modernize-use-trailing-return-type,
101-
102-
-performance-inefficient-string-concatenation,
103-
-performance-no-int-to-ptr,
104-
-performance-avoid-endl,
105-
-performance-unnecessary-value-param,
106-
107-
-portability-simd-intrinsics,
108-
109-
-readability-avoid-unconditional-preprocessor-if,
110-
-readability-braces-around-statements,
111-
-readability-convert-member-functions-to-static,
112-
-readability-else-after-return,
113-
-readability-function-cognitive-complexity,
114-
-readability-function-size,
115-
-readability-identifier-length,
116-
-readability-identifier-naming, # useful but too slow
117-
-readability-implicit-bool-conversion,
118-
-readability-isolate-declaration,
119-
-readability-magic-numbers,
120-
-readability-named-parameter,
121-
-readability-redundant-declaration,
122-
-readability-simplify-boolean-expr,
123-
-readability-static-accessed-through-instance,
124-
-readability-suspicious-call-argument,
125-
-readability-uppercase-literal-suffix,
126-
-readability-use-anyofallof,
127-
128-
-zircon-*,
129-
'
8+
HeaderFilterRegex: '^.*/(base|src|programs|utils)/.*(h|hpp)$'
9+
10+
Checks: [
11+
'*',
12+
13+
'-abseil-string-find-str-contains', # disabled to avoid a misleading suggestion (obsolete absl::StrContains() instead of C++23 std::string::contains())
14+
15+
'-altera-*',
16+
17+
'-android-*',
18+
19+
'-boost-use-ranges',
20+
21+
'-bugprone-assignment-in-if-condition',
22+
'-bugprone-branch-clone',
23+
'-bugprone-easily-swappable-parameters',
24+
'-bugprone-exception-escape',
25+
'-bugprone-implicit-widening-of-multiplication-result',
26+
'-bugprone-multi-level-implicit-pointer-conversion',
27+
'-bugprone-narrowing-conversions',
28+
'-bugprone-unchecked-optional-access',
29+
'-bugprone-crtp-constructor-accessibility',
30+
'-bugprone-not-null-terminated-result',
31+
32+
'-cert-dcl16-c',
33+
'-cert-err58-cpp',
34+
35+
'-clang-analyzer-optin.performance.Padding',
36+
37+
'-cppcoreguidelines-*', # impractical in a codebase as large as ClickHouse, also slow
38+
39+
'-darwin-*',
40+
41+
'-fuchsia-*',
42+
43+
'-google-build-using-namespace',
44+
'-google-readability-braces-around-statements',
45+
'-google-readability-casting',
46+
'-google-readability-function-size',
47+
'-google-readability-namespace-comments',
48+
'-google-readability-todo',
49+
50+
'-hicpp-avoid-c-arrays',
51+
'-hicpp-avoid-goto',
52+
'-hicpp-braces-around-statements',
53+
'-hicpp-explicit-conversions',
54+
'-hicpp-function-size',
55+
'-hicpp-member-init',
56+
'-hicpp-move-const-arg',
57+
'-hicpp-multiway-paths-covered',
58+
'-hicpp-named-parameter',
59+
'-hicpp-no-array-decay',
60+
'-hicpp-no-assembler',
61+
'-hicpp-no-malloc',
62+
'-hicpp-signed-bitwise',
63+
'-hicpp-special-member-functions',
64+
'-hicpp-uppercase-literal-suffix',
65+
'-hicpp-use-auto',
66+
'-hicpp-use-emplace',
67+
'-hicpp-vararg',
68+
69+
'-llvm-*',
70+
71+
'-llvmlibc-*',
72+
73+
'-misc-const-correctness',
74+
'-misc-include-cleaner', # useful but far too many occurrences
75+
'-misc-no-recursion',
76+
'-misc-non-private-member-variables-in-classes',
77+
'-misc-use-anonymous-namespace',
78+
'-misc-use-internal-linkage',
79+
80+
'-modernize-avoid-c-arrays',
81+
'-modernize-concat-nested-namespaces',
82+
'-modernize-pass-by-value',
83+
'-modernize-return-braced-init-list',
84+
'-modernize-use-auto',
85+
'-modernize-use-default-member-init',
86+
'-modernize-use-emplace',
87+
'-modernize-use-nodiscard',
88+
'-modernize-use-ranges',
89+
'-modernize-use-trailing-return-type',
90+
'-modernize-use-designated-initializers',
91+
92+
'-performance-avoid-endl',
93+
'-performance-enum-size',
94+
'-performance-inefficient-string-concatenation',
95+
'-performance-inefficient-vector-operation',
96+
'-performance-no-int-to-ptr',
97+
'-performance-unnecessary-value-param',
98+
99+
'-portability-simd-intrinsics',
100+
101+
'-readability-avoid-nested-conditional-operator',
102+
'-readability-avoid-unconditional-preprocessor-if',
103+
'-readability-braces-around-statements',
104+
'-readability-convert-member-functions-to-static',
105+
'-readability-else-after-return',
106+
'-readability-function-cognitive-complexity',
107+
'-readability-function-size',
108+
'-readability-identifier-length',
109+
'-readability-identifier-naming', # useful but too slow
110+
'-readability-implicit-bool-conversion',
111+
'-readability-magic-numbers',
112+
'-readability-named-parameter',
113+
'-readability-redundant-declaration',
114+
'-readability-redundant-inline-specifier', # useful but incompatible with __attribute((always_inline))__ (aka. ALWAYS_INLINE, base/base/defines.h).
115+
# ALWAYS_INLINE only has an effect if combined with `inline`: https://godbolt.org/z/Eefd74qdM
116+
'-readability-redundant-member-init', # Useful but triggers another problem. Imagine a struct S with multiple String members. Structs are often instantiated via designated
117+
# initializer S s{.s1 = [...], .s2 = [...], [...]}. In this case, compiler warning `missing-field-initializers` requires to specify all members which are not in-struct
118+
# initialized (example: s1 in struct S { String s1; String s2{};}; is not in-struct initialized, therefore it must be specified at instantiation time). As explicitly
119+
# specifying all members is tedious for large structs, `missing-field-initializers` makes programmers initialize as many members as possible in-struct. Clang-tidy
120+
# warning `readability-redundant-member-init` does the opposite thing, both are not compatible with each other.
121+
'-readability-simplify-boolean-expr',
122+
'-readability-suspicious-call-argument',
123+
'-readability-uppercase-literal-suffix',
124+
'-readability-use-anyofallof',
125+
'-readability-math-missing-parentheses',
126+
127+
'-zircon-*'
128+
]
130129

131130
WarningsAsErrors: '*'
132131

.clangd

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,6 @@ Diagnostics:
1414
readability-identifier-naming,
1515
bugprone-reserved-identifier,
1616
]
17+
# Require LLVM 20 (https://github.com/llvm/llvm-project/pull/67749)
18+
Style:
19+
AngledHeaders: [".*"]

.editorconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ charset = utf-8
1919
indent_style = space
2020
indent_size = 4
2121
trim_trailing_whitespace = true
22+
23+
# Some SQL results have trailing whitespace which is removed by IDEs
24+
[tests/queries/**.reference]
25+
trim_trailing_whitespace = false

.git-blame-ignore-revs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,9 @@
1313
# dbms/ → src/
1414
# (though it is unlikely that you will see it in blame)
1515
06446b4f08a142d6f1bc30664c47ded88ab51782
16+
17+
# Applied Black formatter for Python code
18+
e6f5a3f98b21ba99cf274a9833797889e020a2b3
19+
20+
# Enabling clang-tidy readability-else-no-return rule
21+
67c1e89d90ef576e62f8b1c68269742a3c6f9b1e

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@ contrib/* linguist-vendored
22
*.h linguist-language=C++
33
tests/queries/0_stateless/data_json/* binary
44
tests/queries/0_stateless/*.reference -crlf
5+
src/Core/SettingsChangesHistory.cpp merge=union

.github/ISSUE_TEMPLATE/10_question.md

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Question
2+
description: Ask a question about ClickHouse
3+
labels: ["question"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
> Make sure to check documentation https://clickhouse.com/docs/ first. If the question is concise and probably has a short answer, asking it in [community Slack](https://join.slack.com/t/clickhousedb/shared_invite/zt-1gh9ds7f4-PgDhJAaF8ad5RbWBAAjzFg) is probably the fastest way to find the answer. For more complicated questions, consider asking them on StackOverflow with "clickhouse" tag https://stackoverflow.com/questions/tagged/clickhouse
9+
- type: textarea
10+
attributes:
11+
label: Company or project name
12+
description: Put your company name or project description here.
13+
validations:
14+
required: false
15+
- type: textarea
16+
attributes:
17+
label: Question
18+
description: Please put your question here.
19+
validations:
20+
required: true

.github/ISSUE_TEMPLATE/20_feature-request.md

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Feature request
2+
description: Suggest an idea for ClickHouse
3+
labels: ["feature"]
4+
body:
5+
- type: markdown
6+
attributes:
7+
value: |
8+
> (you don't have to strictly follow this form)
9+
- type: textarea
10+
attributes:
11+
label: Company or project name
12+
description: Put your company name or project description here.
13+
validations:
14+
required: false
15+
- type: textarea
16+
attributes:
17+
label: Use case
18+
description: A clear and concise description of what the intended usage scenario is.
19+
validations:
20+
required: true
21+
- type: textarea
22+
attributes:
23+
label: Describe the solution you'd like
24+
description: A clear and concise description of what you want to happen.
25+
validations:
26+
required: true
27+
- type: textarea
28+
attributes:
29+
label: Describe alternatives you've considered
30+
description: A clear and concise description of any alternative solutions or features you've considered.
31+
validations:
32+
required: false
33+
- type: textarea
34+
attributes:
35+
label: Additional context
36+
description: Add any other context or screenshots about the feature request here.
37+
validations:
38+
required: false

0 commit comments

Comments
 (0)