- Logging level can be changed without restarting the server.
- Added the
SHOW CREATE DATABASEquery. - The
query_idcan be passed toclickhouse-client(elBroom). - New setting:
max_network_bandwidth_for_all_users. - Added support for
ALTER TABLE ... PARTITION ...forMATERIALIZED VIEW. - Added information about the size of data parts in uncompressed form in the system table.
- Server-to-server encryption support for distributed tables (
<secure>1</secure>in the replica config in<remote_servers>). - Configuration of the table level for the
ReplicatedMergeTreefamily in order to minimize the amount of data stored in zookeeper:use_minimalistic_checksums_in_zookeeper = 1 - Configuration of the
clickhouse-clientprompt. By default, server names are now output to the prompt. The server's display name can be changed; it's also sent in theX-ClickHouse-Display-NameHTTP header (Kirill Shvakov). - Multiple comma-separated
topicscan be specified for theKafkaengine (Tobias Adamson). - When a query is stopped by
KILL QUERYorreplace_running_query, the client receives theQuery was cancelledexception instead of an incomplete response.
ALTER TABLE ... DROP/DETACH PARTITIONqueries are run at the front of the replication queue.SELECT ... FINALandOPTIMIZE ... FINALcan be used even when the table has a single data part.- A
query_logtable is recreated on the fly if it was deleted manually (Kirill Shvakov). - The
lengthUTF8function runs faster (zhang2014). - Improved performance of synchronous inserts in
Distributedtables (insert_distributed_sync = 1) when there is a very large number of shards. - The server accepts the
send_timeoutandreceive_timeoutsettings from the client and applies them when connecting to the client (they are applied in reverse order: the server socket'ssend_timeoutis set to thereceive_timeoutvalue received from the client, and vice versa). - More robust crash recovery for asynchronous insertion into
Distributedtables. - The return type of the
countEqualfunction changed fromUInt32toUInt64(谢磊).
- Fixed an error with
INwhen the left side of the expression isNullable. - Correct results are now returned when using tuples with
INwhen some of the tuple components are in the table index. - The
max_execution_timelimit now works correctly with distributed queries. - Fixed errors when calculating the size of composite columns in the
system.columnstable. - Fixed an error when creating a temporary table
CREATE TEMPORARY TABLE IF NOT EXISTS. - Fixed errors in
StorageKafka(#2075) - Fixed server crashes from invalid arguments of certain aggregate functions.
- Fixed the error that prevented the
DETACH DATABASEquery from stopping background tasks forReplicatedMergeTreetables. Too many partsstate is less likely to happen when inserting into aggregated materialized views (#2084).- Corrected recursive handling of substitutions in the config if a substitution must be followed by another substitution on the same level.
- Corrected the syntax in the metadata file when creating a
VIEWthat uses a query withUNION ALL. SummingMergeTreenow works correctly for summation of nested data structures with a composite key.- Fixed the possibility of a race condition when choosing the leader for
ReplicatedMergeTreetables.
- The build supports
ninjainstead ofmakeand uses it by default for building releases. - Renamed packages:
clickhouse-server-baseis nowclickhouse-common-static;clickhouse-server-commonis nowclickhouse-server;clickhouse-common-dbgis nowclickhouse-common-static-dbg. To install, useclickhouse-server clickhouse-client. Packages with the old names will still load in the repositories for backward compatibility.
- Removed the special interpretation of an IN expression if an array is specified on the left side. Previously, the expression
arr IN (set)was interpreted as "at least onearrelement belongs to theset". To get the same behavior in the new version, writearrayExists(x -> x IN (set), arr). - Disabled the incorrect use of the socket option
SO_REUSEPORT, which was incorrectly enabled by default in the Poco library. Note that on Linux there is no longer any reason to simultaneously specify the addresses::and0.0.0.0for listen – use just::, which allows listening to the connection both over IPv4 and IPv6 (with the default kernel config settings). You can also revert to the behavior from previous versions by specifying<listen_reuse_port>1</listen_reuse_port>in the config.
- Added the
system.macrostable and auto updating of macros when the config file is changed. - Added the
SYSTEM RELOAD CONFIGquery. - Added the
maxIntersections(left_col, right_col)aggregate function, which returns the maximum number of simultaneously intersecting intervals[left; right]. ThemaxIntersectionsPosition(left, right)function returns the beginning of the "maximum" interval. (Michael Furmur).
- When inserting data in a
Replicatedtable, fewer requests are made toZooKeeper(and most of the user-level errors have disappeared from theZooKeeperlog). - Added the ability to create aliases for sets. Example:
WITH (1, 2, 3) AS set SELECT number IN set FROM system.numbers LIMIT 10.
- Fixed the
Illegal PREWHEREerror when reading fromMergetables overDistributedtables. - Added fixes that allow you to run
clickhouse-serverin IPv4-only Docker containers. - Fixed a race condition when reading from system
system.parts_columnstables. - Removed double buffering during a synchronous insert to a
Distributedtable, which could have caused the connection to timeout. - Fixed a bug that caused excessively long waits for an unavailable replica before beginning a
SELECTquery. - Fixed incorrect dates in the
system.partstable. - Fixed a bug that made it impossible to insert data in a
Replicatedtable ifchrootwas non-empty in the configuration of theZooKeepercluster. - Fixed the vertical merging algorithm for an empty
ORDER BYtable. - Restored the ability to use dictionaries in queries to remote tables, even if these dictionaries are not present on the requestor server. This functionality was lost in release 1.1.54362.
- Restored the behavior for queries like
SELECT * FROM remote('server2', default.table) WHERE col IN (SELECT col2 FROM default.table)when the right side argument of theINshould use a remotedefault.tableinstead of a local one. This behavior was broken in version 1.1.54358. - Removed extraneous error-level logging of
Not found column ... in block.
- Aggregation without
GROUP BYfor an empty set (such asSELECT count(*) FROM table WHERE 0) now returns a result with one row with null values for aggregate functions, in compliance with the SQL standard. To restore the old behavior (return an empty result), setempty_result_for_aggregation_by_empty_setto 1. - Added type conversion for
UNION ALL. Different alias names are allowed inSELECTpositions inUNION ALL, in compliance with the SQL standard. - Arbitrary expressions are supported in
LIMIT BYsections. Previously, it was only possible to use columns resulting fromSELECT. - An index of
MergeTreetables is used whenINis applied to a tuple of expressions from the columns of the primary key. Example:WHERE (UserID, EventDate) IN ((123, '2000-01-01'), ...)(Anastasiya Tsarkova). - Added the
clickhouse-copiertool for copying between clusters and resharding data (beta). - Added consistent hashing functions:
yandexConsistentHash,jumpConsistentHash,sumburConsistentHash. They can be used as a sharding key in order to reduce the amount of network traffic during subsequent reshardings. - Added functions:
arrayAny,arrayAll,hasAny,hasAll,arrayIntersect,arrayResize. - Added the
arrayCumSumfunction (Javi Santana). - Added the
parseDateTimeBestEffort,parseDateTimeBestEffortOrZero, andparseDateTimeBestEffortOrNullfunctions to read the DateTime from a string containing text in a wide variety of possible formats. - It is now possible to change the logging settings without restarting the server.
- Added the
clustertable function. Example:cluster(cluster_name, db, table). Theremotetable function can accept the cluster name as the first argument, if it is specified as an identifier. - Added the
create_table_queryandengine_fullvirtual columns to thesystem.tablestable . Themetadata_modification_timecolumn is virtual. - Added the
data_pathandmetadata_pathcolumns tosystem.tablesandsystem.databasestables, and added thepathcolumn to thesystem.partsandsystem.parts_columnstables. - Added additional information about merges in the
system.part_logtable. - An arbitrary partitioning key can be used for the
system.query_logtable (Kirill Shvakov). - The
SHOW TABLESquery now also shows temporary tables. Added temporary tables and theis_temporarycolumn tosystem.tables(zhang2014). - Added the
DROP TEMPORARY TABLEquery (zhang2014). - Support for
SHOW CREATE TABLEfor temporary tables (zhang2014). - Added the
system_profileconfiguration parameter for the settings used by internal processes. - Support for loading
object_idas an attribute inMongoDBdictionaries (Pavel Litvinenko). - Reading
nullas the default value when loading data for an external dictionary with theMongoDBsource (Pavel Litvinenko). - Reading
DateTimevalues in theValuesformat from a Unix timestamp without single quotes. - Failover is supported in
remotetable functions for cases when some of the replicas are missing the requested table. - Configuration settings can be overridden in the command line when you run
clickhouse-server. Example:clickhouse-server -- --logger.level=information. - Implemented the
emptyfunction from aFixedStringargument: the function returns 1 if the string consists entirely of null bytes (zhang2014). - Added the
listen_tryconfiguration parameter for listening to at least one of the listen addresses without quitting, if some of the addresses can't be listened to (useful for systems with disabled support for IPv4 or IPv6). - Added the
VersionedCollapsingMergeTreetable engine. - Support for rows and arbitrary numeric types for the
librarydictionary source. MergeTreetables can be used without a primary key (you need to specifyORDER BY tuple()).- A
Nullabletype can beCASTto a non-Nullabletype if the argument is notNULL. RENAME TABLEcan be performed forVIEW.- Added the
odbc_default_field_sizeoption, which allows you to extend the maximum size of the value loaded from an ODBC source (by default, it is 1024).
- Limits and quotas on the result are no longer applied to intermediate data for
INSERT SELECTqueries or forSELECTsubqueries. - Fewer false triggers of
force_restore_datawhen checking the status ofReplicatedtables when the server starts. - Added the
allow_distributed_ddloption. - Nondeterministic functions are not allowed in expressions for
MergeTreetable keys. - Files with substitutions from
config.ddirectories are loaded in alphabetical order. - Improved performance of the
arrayElementfunction in the case of a constant multidimensional array with an empty array as one of the elements. Example:[[1], []][x]. - The server starts faster now when using configuration files with very large substitutions (for instance, very large lists of IP networks).
- When running a query, table valued functions run once. Previously,
remoteandmysqltable valued functions performed the same query twice to retrieve the table structure from a remote server. - The
MkDocsdocumentation generator is used. - When you try to delete a table column that
DEFAULT/MATERIALIZEDexpressions of other columns depend on, an exception is thrown (zhang2014). - Added the ability to parse an empty line in text formats as the number 0 for
Floatdata types. This feature was previously available but was lost in release 1.1.54342. Enumvalues can be used inmin,max,sumand some other functions. In these cases, it uses the corresponding numeric values. This feature was previously available but was lost in the release 1.1.54337.- Added
max_expanded_ast_elementsto restrict the size of the AST after recursively expanding aliases.
- Fixed cases when unnecessary columns were removed from subqueries in error, or not removed from subqueries containing
UNION ALL. - Fixed a bug in merges for
ReplacingMergeTreetables. - Fixed synchronous insertions in
Distributedtables (insert_distributed_sync = 1). - Fixed segfault for certain uses of
FULLandRIGHT JOINwith duplicate columns in subqueries. - Fixed the order of the
sourceandlast_exceptioncolumns in thesystem.dictionariestable. - Fixed a bug when the
DROP DATABASEquery did not delete the file with metadata. - Fixed the
DROP DATABASEquery forDictionarydatabases. - Fixed the low precision of
uniqHLL12anduniqCombinedfunctions for cardinalities greater than 100 million items (Alex Bocharov). - Fixed the calculation of implicit default values when necessary to simultaneously calculate default explicit expressions in
INSERTqueries (zhang2014). - Fixed a rare case when a query to a
MergeTreetable couldn't finish (chenxing-xc). - Fixed a crash that occurred when running a
CHECKquery forDistributedtables if all shards are local (chenxing.xc). - Fixed a slight performance regression with functions that use regular expressions.
- Fixed a performance regression when creating multidimensional arrays from complex expressions.
- Fixed a bug that could cause an extra
FORMATsection to appear in an.sqlfile with metadata. - Fixed a bug that caused the
max_table_size_to_droplimit to apply when trying to delete aMATERIALIZED VIEWlooking at an explicitly specified table. - Fixed incompatibility with old clients (old clients were sometimes sent data with the
DateTime('timezone')type, which they do not understand). - Fixed a bug when reading
Nestedcolumn elements of structures that were added usingALTERbut that are empty for the old partitions, when the conditions for these columns moved toPREWHERE. - Fixed a bug when filtering tables by virtual
_tablecolumns in queries toMergetables. - Fixed a bug when using
ALIAScolumns inDistributedtables. - Fixed a bug that made dynamic compilation impossible for queries with aggregate functions from the
quantilefamily. - Fixed a race condition in the query execution pipeline that occurred in very rare cases when using
Mergetables with a large number of tables, and when usingGLOBALsubqueries. - Fixed a crash when passing arrays of different sizes to an
arrayReducefunction when using aggregate functions from multiple arguments. - Prohibited the use of queries with
UNION ALLin aMATERIALIZED VIEW.
- Removed the
distributed_ddl_allow_replicated_alteroption. This behavior is enabled by default. - Removed the
UnsortedMergeTreeengine.
- Added macros support for defining cluster names in distributed DDL queries and constructors of Distributed tables:
CREATE TABLE distr ON CLUSTER '{cluster}' (...) ENGINE = Distributed('{cluster}', 'db', 'table'). - Now the table index is used for conditions like
expr IN (subquery). - Improved processing of duplicates when inserting to Replicated tables, so they no longer slow down execution of the replication queue.
This release contains bug fixes for the previous release 1.1.54337:
- Fixed a regression in 1.1.54337: if the default user has readonly access, then the server refuses to start up with the message
Cannot create database in readonly mode. - Fixed a regression in 1.1.54337: on systems with
systemd, logs are always written to syslog regardless of the configuration; the watchdog script still usesinit.d. - Fixed a regression in 1.1.54337: wrong default configuration in the Docker image.
- Fixed nondeterministic behaviour of GraphiteMergeTree (you can notice it in log messages
Data after merge is not byte-identical to data on another replicas). - Fixed a bug that may lead to inconsistent merges after OPTIMIZE query to Replicated tables (you may notice it in log messages
Part ... intersects previous part). - Buffer tables now work correctly when MATERIALIZED columns are present in the destination table (by zhang2014).
- Fixed a bug in implementation of NULL.
- Added support for storage of multidimensional arrays and tuples (
Tupledata type) in tables. - Added support for table functions in
DESCRIBEandINSERTqueries. Added support for subqueries inDESCRIBE. Examples:DESC TABLE remote('host', default.hits);DESC TABLE (SELECT 1);INSERT INTO TABLE FUNCTION remote('host', default.hits). Support forINSERT INTO TABLEsyntax in addition toINSERT INTO. - Improved support for timezones. The
DateTimedata type can be annotated with the timezone that is used for parsing and formatting in text formats. Example:DateTime('Europe/Moscow'). When timezones are specified in functions for DateTime arguments, the return type will track the timezone, and the value will be displayed as expected. - Added the functions
toTimeZone,timeDiff,toQuarter,toRelativeQuarterNum. ThetoRelativeHour/Minute/Secondfunctions can take a value of typeDateas an argument. The name of thenowfunction has been made case-insensitive. - Added the
toStartOfFifteenMinutesfunction (Kirill Shvakov). - Added the
clickhouse formattool for formatting queries. - Added the
format_schema_pathconfiguration parameter (Marek Vavruša). It is used for specifying a schema inCap'n'Protoformat. Schema files can be located only in the specified directory. - Added support for config substitutions (
inclandconf.d) for configuration of external dictionaries and models (Pavel Yakunin). - Added a column with documentation for the
system.settingstable (Kirill Shvakov). - Added the
system.parts_columnstable with information about column sizes in each data part ofMergeTreetables. - Added the
system.modelstable with information about loadedCatBoostmachine learning models. - Added the
mysqlandodbctable functions along with the correspondingMySQLandODBCtable engines for working with foreign databases. This feature is in the beta stage. - Added the possibility to pass an argument of type
AggregateFunctionfor thegroupArrayaggregate function (so you can create an array of states of some aggregate function). - Removed restrictions on various combinations of aggregate function combinators. For example, you can use
avgForEachIfas well asavgIfForEachaggregate functions, which have different behaviors. - The
-ForEachaggregate function combinator is extended for the case of aggregate functions of multiple arguments. - Added support for aggregate functions of
Nullablearguments even for cases when the function returns a non-Nullableresult (added with the contribution of Silviu Caragea). Examples:groupArray,groupUniqArray,topK. - Added the
max_client_network_bandwidthcommand line parameter forclickhouse-client(Kirill Shvakov). - Users with the
readonly = 2setting are allowed to work with TEMPORARY tables (CREATE, DROP, INSERT...) (Kirill Shvakov). - Added support for using multiple consumers with the
Kafkaengine. Extended configuration options forKafka(Marek Vavruša). - Added the
intExp2andintExp10functions. - Added the
sumKahanaggregate function (computationally stable summation of floating point numbers). - Added toNumberOrNull functions, where Number is a numeric type.
- Added support for the
WITHclause for anINSERT SELECTquery (by zhang2014). - Added the settings
http_connection_timeout,http_send_timeout, andhttp_receive_timeout. In particular, these settings are used for downloading data parts for replication. Changing these settings allows for faster failover if the network is overloaded. - Added support for the
ALTERquery for tables of typeNull(Anastasiya Tsarkova). Tables of typeNullare often used with materialized views. - The
reinterpretAsStringfunction is extended for all data types that are stored contiguously in memory. - Added the
--silentoption for theclickhouse-localtool. It suppresses printing query execution info in stderr. - Added support for reading values of type
Datefrom text in a format where the month and/or day of the month is specified using a single digit instead of two digits (Amos Bird).
- Improved performance of
min,max,any,anyLast,anyHeavy,argMin,argMaxaggregate functions for String arguments. - Improved performance of
isInfinite,isFinite,isNaN,roundToExp2functions. - Improved performance of parsing and formatting values of type
DateandDateTimein text formats. - Improved performance and precision of parsing floating point numbers.
- Lowered memory usage for
JOINin the case when the left and right parts have columns with identical names that are not contained inUSING. - Improved performance of
varSamp,varPop,stddevSamp,stddevPop,covarSamp,covarPop, andcorraggregate functions by reducing computational stability. The old functions are available under the names:varSampStable,varPopStable,stddevSampStable,stddevPopStable,covarSampStable,covarPopStable,corrStable.
- Fixed data deduplication after running a
DROP PARTITIONquery. In the previous version, dropping a partition and INSERTing the same data again was not working because INSERTed blocks were considered duplicates. - Fixed a bug that could lead to incorrect interpretation of the
WHEREclause forCREATE MATERIALIZED VIEWqueries withPOPULATE. - Fixed a bug in using the
root_pathparameter in thezookeeper_serversconfiguration. - Fixed unexpected results of passing the
Dateargument totoStartOfDay. - Fixed the
addMonthsandsubtractMonthsfunctions and the arithmetic forINTERVAL n MONTHin cases when the result has the previous year. - Added missing support for the
UUIDdata type forDISTINCT,JOIN, anduniqaggregate functions and external dictionaries (Evgeniy Ivanov). Support forUUIDis still incomplete. - Fixed
SummingMergeTreebehavior in cases when the rows summed to zero. - Various fixes for the
Kafkaengine (Marek Vavruša). - Fixed incorrect behavior of the
Jointable engine (Amos Bird). - Fixed incorrect allocator behavior under FreeBSD and OS X.
- The
extractAllfunction now supports empty matches. - Fixed an error that blocked usage of
libresslinstead ofopenssl. - Fixed the
CREATE TABLE AS SELECTquery from temporary tables. - Fixed non-atomicity of updating the replication queue. This could lead to replicas being out of sync until the server restarts.
- Fixed possible overflow in
gcd,lcmandmodulo(%operator) (Maks Skorokhod). -preprocessedfiles are now created after changingumask(umaskcan be changed in the config).- Fixed a bug in the background check of parts (
MergeTreePartChecker) when using a custom partition key. - Fixed parsing of tuples (values of the
Tupledata type) in text formats. - Improved error messages about incompatible types passed to
multiIf,arrayand some other functions. - Support for
Nullabletypes is completely reworked. Fixed bugs that may lead to a server crash. Fixed almost all other bugs related to NULL support: incorrect type conversions in INSERT SELECT, insufficient support for Nullable in HAVING and PREWHERE,join_use_nullsmode, Nullable types as arguments of OR operator, etc. - Fixed various bugs related to internal semantics of data types. Examples: unnecessary summing of
Enumtype fields inSummingMergeTree; alignment ofEnumtypes in Pretty formats, etc. - Stricter checks for allowed combinations of composite columns. Fixed several bugs that could lead to a server crash.
- Fixed the overflow when specifying a very large parameter for the
FixedStringdata type. - Fixed a bug in the
topKaggregate function in a generic case. - Added the missing check for equality of array sizes in arguments of n-ary variants of aggregate functions with an
-Arraycombinator. - Fixed the
--pageroption forclickhouse-client(by ks1322). - Fixed the precision of the
exp10function. - Fixed the behavior of the
visitParamExtractfunction for better compliance with documentation. - Fixed the crash when incorrect data types are specified.
- Fixed the behavior of
DISTINCTin the case when all columns are constants. - Fixed query formatting in the case of using the
tupleElementfunction with a complex constant expression as the tuple element index. - Fixed the
Dictionarytable engine for dictionaries of typerange_hashed. - Fixed a bug that leads to excessive rows in the result of
FULLandRIGHT JOIN(Amos Bird). - Fixed a server crash when creating and removing temporary files in
config.ddirectories during config reload. - Fixed the
SYSTEM DROP DNS CACHEquery: the cache was flushed but addresses of cluster nodes were not updated. - Fixed the behavior of
MATERIALIZED VIEWafter executingDETACH TABLEfor the table under the view (Marek Vavruša).
- Builds use
pbuilder. The build process is almost completely independent of the build host environment. - A single build is used for different OS versions. Packages and binaries have been made compatible with a wide range of Linux systems.
- Added the
clickhouse-testpackage. It can be used to run functional tests. - The source tarball can now be published to the repository. It can be used to reproduce the build without using GitHub.
- Added limited integration with Travis CI. Due to limits on build time in Travis, only the debug build is tested and a limited subset of tests are run.
- Added support for
Cap'n'Protoin the default build. - Changed the format of documentation sources from
Restructured TexttoMarkdown. - Added support for
systemd(Vladimir Smirnov). It is disabled by default due to incompatibility with some OS images and can be enabled manually. - For dynamic code generation,
clangandlldare embedded into theclickhousebinary. They can also be invoked asclickhouse clangandclickhouse lld. - Removed usage of GNU extensions from the code. Enabled the
-Wextraoption. When building withclang,libc++is used instead oflibstdc++. - Extracted
clickhouse_parsersandclickhouse_common_iolibraries to speed up builds of various tools.
- The format for marks in
Logtype tables that containNullablecolumns was changed in a backward incompatible way. If you have these tables, you should convert them to theTinyLogtype before starting up the new server version. To do this, replaceENGINE = LogwithENGINE = TinyLogin the corresponding.sqlfile in themetadatadirectory. If your table doesn't haveNullablecolumns or if the type of your table is notLog, then you don't need to do anything. - Removed the
experimental_allow_extended_storage_definition_syntaxsetting. Now this feature is enabled by default. - To avoid confusion, the
runningIncomefunction has been renamed torunningDifferenceStartingWithFirstValue. - Removed the
FROM ARRAY JOIN arrsyntax when ARRAY JOIN is specified directly after FROM with no table (Amos Bird). - Removed the
BlockTabSeparatedformat that was used solely for demonstration purposes. - Changed the serialization format of intermediate states of the aggregate functions
varSamp,varPop,stddevSamp,stddevPop,covarSamp,covarPop, andcorr. If you have stored states of these aggregate functions in tables (using the AggregateFunction data type or materialized views with corresponding states), please write to clickhouse-feedback@yandex-team.com. - In previous server versions there was an undocumented feature: if an aggregate function depends on parameters, you can still specify it without parameters in the AggregateFunction data type. Example:
AggregateFunction(quantiles, UInt64)instead ofAggregateFunction(quantiles(0.5, 0.9), UInt64). This feature was lost. Although it was undocumented, we plan to support it again in future releases. - Enum data types cannot be used in min/max aggregate functions. The possibility will be returned back in future release.
- When doing a rolling update on a cluster, at the point when some of the replicas are running the old version of ClickHouse and some are running the new version, replication is temporarily stopped and the message
unknown parameter 'shard'appears in the log. Replication will continue after all replicas of the cluster are updated. - If you have different ClickHouse versions on the cluster, you can get incorrect results for distributed queries with the aggregate functions
varSamp,varPop,stddevSamp,stddevPop,covarSamp,covarPop, andcorr. You should update all cluster nodes.
This release contains bug fixes for the previous release 1.1.54318:
- Fixed bug with possible race condition in replication that could lead to data loss. This issue affects versions 1.1.54310 and 1.1.54318. If you use one of these versions with Replicated tables, the update is strongly recommended. This issue shows in logs in Warning messages like
Part ... from own log doesn't exist.The issue is relevant even if you don't see these messages in logs.
This release contains bug fixes for the previous release 1.1.54310:
- Fixed incorrect row deletions during merges in the SummingMergeTree engine
- Fixed a memory leak in unreplicated MergeTree engines
- Fixed performance degradation with frequent inserts in MergeTree engines
- Fixed an issue that was causing the replication queue to stop running
- Fixed rotation and archiving of server logs
- Custom partitioning key for the MergeTree family of table engines.
- Kafka table engine.
- Added support for loading CatBoost models and applying them to data stored in ClickHouse.
- Added support for time zones with non-integer offsets from UTC.
- Added support for arithmetic operations with time intervals.
- The range of values for the Date and DateTime types is extended to the year 2105.
- Added the
CREATE MATERIALIZED VIEW x TO yquery (specifies an existing table for storing the data of a materialized view). - Added the
ATTACH TABLEquery without arguments. - The processing logic for Nested columns with names ending in -Map in a SummingMergeTree table was extracted to the sumMap aggregate function. You can now specify such columns explicitly.
- Max size of the IP trie dictionary is increased to 128M entries.
- Added the
getSizeOfEnumTypefunction. - Added the
sumWithOverflowaggregate function. - Added support for the Cap'n Proto input format.
- You can now customize compression level when using the zstd algorithm.
- Creation of temporary tables with an engine other than Memory is forbidden.
- Explicit creation of tables with the View or MaterializedView engine is forbidden.
- During table creation, a new check verifies that the sampling key expression is included in the primary key.
- Fixed hangups when synchronously inserting into a Distributed table.
- Fixed nonatomic adding and removing of parts in Replicated tables.
- Data inserted into a materialized view is not subjected to unnecessary deduplication.
- Executing a query to a Distributed table for which the local replica is lagging and remote replicas are unavailable does not result in an error anymore.
- Users don't need access permissions to the
defaultdatabase to create temporary tables anymore. - Fixed crashing when specifying the Array type without arguments.
- Fixed hangups when the disk volume containing server logs is full.
- Fixed an overflow in the
toRelativeWeekNumfunction for the first week of the Unix epoch.
- Several third-party libraries (notably Poco) were updated and converted to git submodules.
- TLS support in the native protocol (to enable, set
tcp_ssl_portinconfig.xml)
ALTERfor replicated tables now tries to start running as soon as possible- Fixed crashing when reading data with the setting
preferred_block_size_bytes=0 - Fixed crashes of
clickhouse-clientwhenPage Downis pressed - Correct interpretation of certain complex queries with
GLOBAL INandUNION ALL FREEZE PARTITIONalways works atomically now- Empty POST requests now return a response with code 411
- Fixed interpretation errors for expressions like
CAST(1 AS Nullable(UInt8)) - Fixed an error when reading columns like
Array(Nullable(String))fromMergeTreetables - Fixed crashing when parsing queries like
SELECT dummy AS dummy, dummy AS b - Users are updated correctly when
users.xmlis invalid - Correct handling when an executable dictionary returns a non-zero response code
- Added the
pointInPolygonfunction for working with coordinates on a coordinate plane. - Added the
sumMapaggregate function for calculating the sum of arrays, similar toSummingMergeTree. - Added the
truncfunction. Improved performance of the rounding functions (round,floor,ceil,roundToExp2) and corrected the logic of how they work. Changed the logic of theroundToExp2function for fractions and negative numbers. - The ClickHouse executable file is now less dependent on the libc version. The same ClickHouse executable file can run on a wide variety of Linux systems. Note: There is still a dependency when using compiled queries (with the setting
compile = 1, which is not used by default). - Reduced the time needed for dynamic compilation of queries.
- Fixed an error that sometimes produced
part ... intersects previous partmessages and weakened replica consistency. - Fixed an error that caused the server to lock up if ZooKeeper was unavailable during shutdown.
- Removed excessive logging when restoring replicas.
- Fixed an error in the UNION ALL implementation.
- Fixed an error in the concat function that occurred if the first column in a block has the Array type.
- Progress is now displayed correctly in the system.merges table.
SYSTEMqueries for server administration:SYSTEM RELOAD DICTIONARY,SYSTEM RELOAD DICTIONARIES,SYSTEM DROP DNS CACHE,SYSTEM SHUTDOWN,SYSTEM KILL.- Added functions for working with arrays:
concat,arraySlice,arrayPushBack,arrayPushFront,arrayPopBack,arrayPopFront. - Added the
rootandidentityparameters for the ZooKeeper configuration. This allows you to isolate individual users on the same ZooKeeper cluster. - Added the aggregate functions
groupBitAnd,groupBitOr, andgroupBitXor(for compatibility, they can also be accessed with the namesBIT_AND,BIT_OR, andBIT_XOR). - External dictionaries can be loaded from MySQL by specifying a socket in the filesystem.
- External dictionaries can be loaded from MySQL over SSL (the
ssl_cert,ssl_key, andssl_caparameters). - Added the
max_network_bandwidth_for_usersetting to restrict the overall bandwidth use for queries per user. - Support for
DROP TABLEfor temporary tables. - Support for reading
DateTimevalues in Unix timestamp format from theCSVandJSONEachRowformats. - Lagging replicas in distributed queries are now excluded by default (the default threshold is 5 minutes).
- FIFO locking is used during ALTER: an ALTER query isn't blocked indefinitely for continuously running queries.
- Option to set
umaskin the config file. - Improved performance for queries with
DISTINCT.
- Improved the process for deleting old nodes in ZooKeeper. Previously, old nodes sometimes didn't get deleted if there were very frequent inserts, which caused the server to be slow to shut down, among other things.
- Fixed randomization when choosing hosts for the connection to ZooKeeper.
- Fixed the exclusion of lagging replicas in distributed queries if the replica is localhost.
- Fixed an error where a data part in a
ReplicatedMergeTreetable could be broken after runningALTER MODIFYon an element in aNestedstructure. - Fixed an error that could cause SELECT queries to "hang".
- Improvements to distributed DDL queries.
- Fixed the query
CREATE TABLE ... AS <materialized view>. - Resolved the deadlock in the
ALTER ... CLEAR COLUMN IN PARTITIONquery forBuffertables. - Fixed the invalid default value for
Enums (0 instead of the minimum) when using theJSONEachRowandTSKVformats. - Resolved the appearance of zombie processes when using a dictionary with an
executablesource. - Fixed segfault for the HEAD query.
- You can use
pbuilderto build ClickHouse. - You can use
libc++instead oflibstdc++for builds on Linux. - Added instructions for using static code analysis tools:
Coverity,clang-tidy, andcppcheck.
- There is now a higher default value for the MergeTree setting
max_bytes_to_merge_at_max_space_in_pool(the maximum total size of data parts to merge, in bytes): it has increased from 100 GiB to 150 GiB. This might result in large merges running after the server upgrade, which could cause an increased load on the disk subsystem. If the free space available on the server is less than twice the total amount of the merges that are running, this will cause all other merges to stop running, including merges of small data parts. As a result, INSERT requests will fail with the message "Merges are processing significantly slower than inserts." Use theSELECT * FROM system.mergesrequest to monitor the situation. You can also check theDiskSpaceReservedForMergemetric in thesystem.metricstable, or in Graphite. You don't need to do anything to fix this, since the issue will resolve itself once the large merges finish. If you find this unacceptable, you can restore the previous value for themax_bytes_to_merge_at_max_space_in_poolsetting (to do this, go to the<merge_tree>section in config.xml, set<max_bytes_to_merge_at_max_space_in_pool>107374182400</max_bytes_to_merge_at_max_space_in_pool>and restart the server).
- This is bugfix release for previous 1.1.54282 release. It fixes ZooKeeper nodes leak in
parts/directory.
This is a bugfix release. The following bugs were fixed:
DB::Exception: Assertion violation: !_path.empty()error when inserting into a Distributed table.- Error when parsing inserted data in RowBinary format if the data begins with ';' character.
- Errors during runtime compilation of certain aggregate functions (e.g.
groupArray()).
- You can use an optional WITH clause in a SELECT query. Example query:
WITH 1+1 AS a SELECT a, a*a - INSERT can be performed synchronously in a Distributed table: OK is returned only after all the data is saved on all the shards. This is activated by the setting insert_distributed_sync=1.
- Added the UUID data type for working with 16-byte identifiers.
- Added aliases of CHAR, FLOAT and other types for compatibility with the Tableau.
- Added the functions toYYYYMM, toYYYYMMDD, and toYYYYMMDDhhmmss for converting time into numbers.
- You can use IP addresses (together with the hostname) to identify servers for clustered DDL queries.
- Added support for non-constant arguments and negative offsets in the function
substring(str, pos, len). - Added the max_size parameter for the
groupArray(max_size)(column)aggregate function, and optimized its performance.
- Improved security: all server files are created with 0640 permissions (can be changed via config parameter).
- Improved error messages for queries with invalid syntax.
- Significantly reduced memory consumption and improved performance when merging large sections of MergeTree data.
- Significantly increased the performance of data merges for the ReplacingMergeTree engine.
- Improved performance for asynchronous inserts from a Distributed table by batching multiple source inserts. To enable this functionality, use the setting distributed_directory_monitor_batch_inserts=1.
- Changed the binary format of aggregate states of
groupArray(array_column)functions for arrays.
- Added the
output_format_json_quote_denormalssetting, which enables outputting nan and inf values in JSON format. - Optimized thread allocation when reading from a Distributed table.
- Settings can be modified in readonly mode if the value doesn't change.
- Added the ability to read fractional granules of the MergeTree engine in order to meet restrictions on the block size specified in the preferred_block_size_bytes setting. The purpose is to reduce the consumption of RAM and increase cache locality when processing queries from tables with large columns.
- Efficient use of indexes that contain expressions like
toStartOfHour(x)for conditions liketoStartOfHour(x) op сonstexpr. - Added new settings for MergeTree engines (the merge_tree section in config.xml):
- replicated_deduplication_window_seconds sets the size of deduplication window in seconds for Replicated tables.
- cleanup_delay_period sets how often to start cleanup to remove outdated data.
- replicated_can_become_leader can prevent a replica from becoming the leader (and assigning merges).
- Accelerated cleanup to remove outdated data from ZooKeeper.
- Multiple improvements and fixes for clustered DDL queries. Of particular interest is the new setting distributed_ddl_task_timeout, which limits the time to wait for a response from the servers in the cluster.
- Improved display of stack traces in the server logs.
- Added the "none" value for the compression method.
- You can use multiple dictionaries_config sections in config.xml.
- It is possible to connect to MySQL through a socket in the file system.
- The
system.partstable has a new column with information about the size of marks, in bytes.
- Distributed tables using a Merge table now work correctly for a SELECT query with a condition on the _table field.
- Fixed a rare race condition in ReplicatedMergeTree when checking data parts.
- Fixed possible freezing on "leader election" when starting a server.
- The max_replica_delay_for_distributed_queries setting was ignored when using a local replica of the data source. This has been fixed.
- Fixed incorrect behavior of
ALTER TABLE CLEAR COLUMN IN PARTITIONwhen attempting to clean a non-existing column. - Fixed an exception in the multiIf function when using empty arrays or strings.
- Fixed excessive memory allocations when deserializing Native format.
- Fixed incorrect auto-update of Trie dictionaries.
- Fixed an exception when running queries with a GROUP BY clause from a Merge table when using SAMPLE.
- Fixed a crash of GROUP BY when using distributed_aggregation_memory_efficient=1.
- Now you can specify the database.table in the right side of IN and JOIN.
- Too many threads were used for parallel aggregation. This has been fixed.
- Fixed how the "if" function works with FixedString arguments.
- SELECT worked incorrectly from a Distributed table for shards with a weight of 0. This has been fixed.
- Crashes no longer occur when running
CREATE VIEW IF EXISTS. - Fixed incorrect behavior when input_format_skip_unknown_fields=1 is set and there are negative numbers.
- Fixed an infinite loop in the
dictGetHierarchy()function if there is some invalid data in the dictionary. - Fixed
Syntax error: unexpected (...)errors when running distributed queries with subqueries in an IN or JOIN clause and Merge tables. - Fixed the incorrect interpretation of a SELECT query from Dictionary tables.
- Fixed the "Cannot mremap" error when using arrays in IN and JOIN clauses with more than 2 billion elements.
- Fixed the failover for dictionaries with MySQL as the source.
- Builds can be assembled in Arcadia.
- You can use gcc 7 to compile ClickHouse.
- Parallel builds using ccache+distcc are faster now.
- Distributed DDL (for example,
CREATE TABLE ON CLUSTER). - The replicated request
ALTER TABLE CLEAR COLUMN IN PARTITION. - The engine for Dictionary tables (access to dictionary data in the form of a table).
- Dictionary database engine (this type of database automatically has Dictionary tables available for all the connected external dictionaries).
- You can check for updates to the dictionary by sending a request to the source.
- Qualified column names
- Quoting identifiers using double quotation marks.
- Sessions in the HTTP interface.
- The OPTIMIZE query for a Replicated table can can run not only on the leader.
- Removed SET GLOBAL.
- If an alert is triggered, the full stack trace is printed into the log.
- Relaxed the verification of the number of damaged or extra data parts at startup (there were too many false positives).
- Fixed a bad connection "sticking" when inserting into a Distributed table.
- GLOBAL IN now works for a query from a Merge table that looks at a Distributed table.
- The incorrect number of cores was detected on a Google Compute Engine virtual machine. This has been fixed.
- Changes in how an executable source of cached external dictionaries works.
- Fixed the comparison of strings containing null characters.
- Fixed the comparison of Float32 primary key fields with constants.
- Previously, an incorrect estimate of the size of a field could lead to overly large allocations. This has been fixed.
- Fixed a crash when querying a Nullable column added to a table using ALTER.
- Fixed a crash when sorting by a Nullable column, if the number of rows is less than LIMIT.
- Fixed an ORDER BY subquery consisting of only constant values.
- Previously, a Replicated table could remain in the invalid state after a failed DROP TABLE.
- Aliases for scalar subqueries with empty results are no longer lost.
- Now a query that used compilation does not fail with an error if the .so file gets damaged.