Skip to content

Commit bd29313

Browse files
committed
Merge branch 'master' of github.com:ClickHouse/ClickHouse into Avogar-patch-6
2 parents b4a3cba + 7e523de commit bd29313

File tree

224 files changed

+884
-644
lines changed

Some content is hidden

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

224 files changed

+884
-644
lines changed

docker/test/fasttest/Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,10 @@ RUN apt-get update \
2626
zstd \
2727
--yes --no-install-recommends \
2828
&& apt-get clean \
29-
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/*
29+
&& rm -rf /var/lib/apt/lists/* /var/cache/debconf /tmp/* \
30+
&& groupadd --system --gid 1000 clickhouse \
31+
&& useradd --system --gid 1000 --uid 1000 -m clickhouse
32+
# ^ For some reason, groupadd and useradd are needed for tests with 'expect', but I don't know, why.
3033

3134
COPY requirements.txt /
3235
RUN pip3 install --no-cache-dir -r /requirements.txt

docker/test/fasttest/run.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ trap 'kill $(jobs -pr) ||:' EXIT
99
stage=${stage:-}
1010

1111
# Compiler version, normally set by Dockerfile
12-
export LLVM_VERSION=${LLVM_VERSION:-17}
12+
export LLVM_VERSION=${LLVM_VERSION:-18}
1313

1414
# A variable to pass additional flags to CMake.
1515
# Here we explicitly default it to nothing so that bash doesn't complain about

docker/test/util/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ ENV DEBIAN_FRONTEND=noninteractive LLVM_VERSION=18
1717

1818
RUN apt-get update \
1919
&& apt-get install \
20+
sudo \
2021
apt-transport-https \
2122
apt-utils \
2223
ca-certificates \

docs/en/interfaces/cli.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ You can pass parameters to `clickhouse-client` (all parameters have a default va
185185
- `--format, -f` – Use the specified default format to output the result.
186186
- `--vertical, -E` – If specified, use the [Vertical format](../interfaces/formats.md#vertical) by default to output the result. This is the same as `–format=Vertical`. In this format, each value is printed on a separate line, which is helpful when displaying wide tables.
187187
- `--time, -t` – If specified, print the query execution time to ‘stderr’ in non-interactive mode.
188+
- `--memory-usage` – If specified, print memory usage to ‘stderr’ in non-interactive mode]. Possible values: 'none' - do not print memory usage, 'default' - print number of bytes, 'readable' - print memory usage in human-readable format.
188189
- `--stacktrace` – If specified, also print the stack trace if an exception occurs.
189190
- `--config-file` – The name of the configuration file.
190191
- `--secure` – If specified, will connect to server over secure connection (TLS). You might need to configure your CA certificates in the [configuration file](#configuration_files). The available configuration settings are the same as for [server-side TLS configuration](../operations/server-configuration-parameters/settings.md#server_configuration_parameters-openssl).
@@ -339,7 +340,7 @@ clickhouse-client clickhouse://some_user%40some_mail.com@localhost:9000
339340
Connect to one of provides hosts: `192.168.1.15`, `192.168.1.25`.
340341

341342
``` bash
342-
clickhouse-client clickhouse://192.168.1.15,192.168.1.25
343+
clickhouse-client clickhouse://192.168.1.15,192.168.1.25
343344
```
344345

345346
### Configuration Files {#configuration_files}
@@ -367,7 +368,7 @@ Example of a config file:
367368
```
368369

369370
Or the same config in a YAML format:
370-
371+
371372
```yaml
372373
user: username
373374
password: 'password'

docs/en/interfaces/formats.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ The supported formats are:
6767
| [Prometheus](#prometheus) |||
6868
| [Protobuf](#protobuf) |||
6969
| [ProtobufSingle](#protobufsingle) |||
70+
| [ProtobufList](#protobuflist) |||
7071
| [Avro](#data-format-avro) |||
7172
| [AvroConfluent](#data-format-avro-confluent) |||
7273
| [Parquet](#data-format-parquet) |||
@@ -1952,6 +1953,35 @@ SYSTEM DROP FORMAT SCHEMA CACHE FOR Protobuf
19521953

19531954
Same as [Protobuf](#protobuf) but for storing/parsing single Protobuf message without length delimiters.
19541955

1956+
## ProtobufList {#protobuflist}
1957+
1958+
Similar to Protobuf but rows are represented as a sequence of sub-messages contained in a message with fixed name "Envelope".
1959+
1960+
Usage example:
1961+
1962+
``` sql
1963+
SELECT * FROM test.table FORMAT ProtobufList SETTINGS format_schema = 'schemafile:MessageType'
1964+
```
1965+
1966+
``` bash
1967+
cat protobuflist_messages.bin | clickhouse-client --query "INSERT INTO test.table FORMAT ProtobufList SETTINGS format_schema='schemafile:MessageType'"
1968+
```
1969+
1970+
where the file `schemafile.proto` looks like this:
1971+
1972+
``` capnp
1973+
syntax = "proto3";
1974+
message Envelope {
1975+
message MessageType {
1976+
string name = 1;
1977+
string surname = 2;
1978+
uint32 birthDate = 3;
1979+
repeated string phoneNumbers = 4;
1980+
};
1981+
MessageType row = 1;
1982+
};
1983+
```
1984+
19551985
## Avro {#data-format-avro}
19561986

19571987
[Apache Avro](https://avro.apache.org/) is a row-oriented data serialization framework developed within Apache’s Hadoop project.

docs/en/sql-reference/functions/other-functions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ WHERE macro = 'test';
7676
└───────┴──────────────┘
7777
```
7878

79-
## FQDN
79+
## fqdn
8080

8181
Returns the fully qualified domain name of the ClickHouse server.
8282

@@ -86,7 +86,7 @@ Returns the fully qualified domain name of the ClickHouse server.
8686
fqdn();
8787
```
8888

89-
Aliases: `fullHostName`, 'FQDN'.
89+
Aliases: `fullHostName`, `FQDN`.
9090

9191
**Returned value**
9292

programs/local/LocalServer.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -423,6 +423,7 @@ void LocalServer::connect()
423423
{
424424
connection_parameters = ConnectionParameters(getClientConfiguration(), "localhost");
425425

426+
/// This is needed for table function input(...).
426427
ReadBuffer * in;
427428
auto table_file = getClientConfiguration().getString("table-file", "-");
428429
if (table_file == "-" || table_file == "stdin")

programs/server/Server.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2731,8 +2731,7 @@ void Server::createInterserverServers(
27312731

27322732
void Server::stopServers(
27332733
std::vector<ProtocolServerAdapter> & servers,
2734-
const ServerType & server_type
2735-
) const
2734+
const ServerType & server_type) const
27362735
{
27372736
LoggerRawPtr log = &logger();
27382737

programs/server/Server.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,8 +129,7 @@ class Server : public BaseDaemon, public IServer
129129

130130
void stopServers(
131131
std::vector<ProtocolServerAdapter> & servers,
132-
const ServerType & server_type
133-
) const;
132+
const ServerType & server_type) const;
134133
};
135134

136135
}

src/AggregateFunctions/AggregateFunctionAnalysisOfVariance.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ AggregateFunctionPtr createAggregateFunctionAnalysisOfVariance(const std::string
118118
void registerAggregateFunctionAnalysisOfVariance(AggregateFunctionFactory & factory)
119119
{
120120
AggregateFunctionProperties properties = { .is_order_dependent = false };
121-
factory.registerFunction("analysisOfVariance", {createAggregateFunctionAnalysisOfVariance, properties}, AggregateFunctionFactory::CaseInsensitive);
121+
factory.registerFunction("analysisOfVariance", {createAggregateFunctionAnalysisOfVariance, properties}, AggregateFunctionFactory::Case::Insensitive);
122122

123123
/// This is widely used term
124-
factory.registerAlias("anova", "analysisOfVariance", AggregateFunctionFactory::CaseInsensitive);
124+
factory.registerAlias("anova", "analysisOfVariance", AggregateFunctionFactory::Case::Insensitive);
125125
}
126126

127127
}

0 commit comments

Comments
 (0)