2018 Changelog
ClickHouse Release 18.16
ClickHouse Release 18.16.1, 2018-12-21
Bug Fixes:
- Fixed an error that led to problems with updating dictionaries with the ODBC source. #3825, #3829
- JIT compilation of aggregate functions now works with LowCardinality columns. #3838
Improvements:
- Added the
low_cardinality_allow_in_native_formatsetting (enabled by default). When disabled, LowCardinality columns will be converted to ordinary columns for SELECT queries and ordinary columns will be expected for INSERT queries. #3879
Build Improvements:
- Fixes for builds on macOS and ARM.
ClickHouse Release 18.16.0, 2018-12-14
New Features:
DEFAULTexpressions are evaluated for missing fields when loading data in semi-structured input formats (JSONEachRow,TSKV). The feature is enabled with theinsert_sample_with_metadatasetting. #3555- The
ALTER TABLEquery now has theMODIFY ORDER BYaction for changing the sorting key when adding or removing a table column. This is useful for tables in theMergeTreefamily that perform additional tasks when merging based on this sorting key, such asSummingMergeTree,AggregatingMergeTree, and so on. #3581 #3755 - For tables in the
MergeTreefamily, now you can specify a different sorting key (ORDER BY) and index (PRIMARY KEY). The sorting key can be longer than the index. #3581 - Added the
hdfstable function and theHDFStable engine for importing and exporting data to HDFS. chenxing-xc - Added functions for working with base64:
base64Encode,base64Decode,tryBase64Decode. Alexander Krasheninnikov - Now you can use a parameter to configure the precision of the
uniqCombinedaggregate function (select the number of HyperLogLog cells). #3406 - Added the
system.contributorstable that contains the names of everyone who made commits in ClickHouse. #3452 - Added the ability to omit the partition for the
ALTER TABLE ... FREEZEquery in order to back up all partitions at once. #3514 - Added
dictGetanddictGetOrDefaultfunctions that do not require specifying the type of return value. The type is determined automatically from the dictionary description. Amos Bird - Now you can specify comments for a column in the table description and change it using
ALTER. #3377 - Reading is supported for
Jointype tables with simple keys. Amos Bird - Now you can specify the options
join_use_nulls,max_rows_in_join,max_bytes_in_join, andjoin_overflow_modewhen creating aJointype table. Amos Bird - Added the
joinGetfunction that allows you to use aJointype table like a dictionary. Amos Bird - Added the
partition_key,sorting_key,primary_key, andsampling_keycolumns to thesystem.tablestable in order to provide information about table keys. #3609 - Added the
is_in_partition_key,is_in_sorting_key,is_in_primary_key, andis_in_sampling_keycolumns to thesystem.columnstable. #3609 - Added the
min_timeandmax_timecolumns to thesystem.partstable. These columns are populated when the partitioning key is an expression consisting ofDateTimecolumns. Emmanuel Donin de Rosière
Bug Fixes:
- Fixes and performance improvements for the
LowCardinalitydata type.GROUP BYusingLowCardinality(Nullable(...)). Getting the values ofextremes. Processing high-order functions.LEFT ARRAY JOIN. DistributedGROUP BY. Functions that returnArray. Execution ofORDER BY. Writing toDistributedtables (nicelulu). Backward compatibility forINSERTqueries from old clients that implement theNativeprotocol. Support forLowCardinalityforJOIN. Improved performance when working in a single stream. #3823 #3803 #3799 #3769 #3744 #3681 #3651 #3649 #3641 #3632 #3568 #3523 #3518 - Fixed how the
select_sequential_consistencyoption works. Previously, when this setting was enabled, an incomplete result was sometimes returned after beginning to write to a new partition. #2863 - Databases are correctly specified when executing DDL
ON CLUSTERqueries andALTER UPDATE/DELETE. #3772 #3460 - Databases are correctly specified for subqueries inside a VIEW. #3521
- Fixed a bug in
PREWHEREwithFINALforVersionedCollapsingMergeTree. 7167bfd7 - Now you can use
KILL QUERYto cancel queries that have not started yet because they are waiting for the table to be locked. #3517 - Corrected date and time calculations if the clocks were moved back at midnight (this happens in Iran, and happened in Moscow from 1981 to 1983). Previously, this led to the time being reset a day earlier than necessary, and also caused incorrect formatting of the date and time in text format. #3819
- Fixed bugs in some cases of
VIEWand subqueries that omit the database. Winter Zhang - Fixed a race condition when simultaneously reading from a
MATERIALIZED VIEWand deleting aMATERIALIZED VIEWdue to not locking the internalMATERIALIZED VIEW. #3404 #3694 - Fixed the error
Lock handler cannot be nullptr.#3689 - Fixed query processing when the
compile_expressionsoption is enabled (it’s enabled by default). Nondeterministic constant expressions like thenowfunction are no longer unfolded. #3457 - Fixed a crash when specifying a non-constant scale argument in
toDecimal32/64/128functions. - Fixed an error when trying to insert an array with
NULLelements in theValuesformat into a column of typeArraywithoutNullable(ifinput_format_values_interpret_expressions= 1). #3487 #3503 - Fixed continuous error logging in
DDLWorkerif ZooKeeper is not available. 8f50c620 - Fixed the return type for
quantile*functions fromDateandDateTimetypes of arguments. #3580 - Fixed the
WITHclause if it specifies a simple alias without expressions. #3570 - Fixed processing of queries with named sub-queries and qualified column names when
enable_optimize_predicate_expressionis enabled. Winter Zhang - Fixed the error
Attempt to attach to nullptr thread groupwhen working with materialized views. Marek Vavruša - Fixed a crash when passing certain incorrect arguments to the
arrayReversefunction. 73e3a7b6 - Fixed the buffer overflow in the
extractURLParameterfunction. Improved performance. Added correct processing of strings containing zero bytes. 141e9799 - Fixed buffer overflow in the
lowerUTF8andupperUTF8functions. Removed the ability to execute these functions overFixedStringtype arguments. #3662 - Fixed a rare race condition when deleting
MergeTreetables. #3680 - Fixed a race condition when reading from
Buffertables and simultaneously performingALTERorDROPon the target tables. #3719 - Fixed a segfault if the
max_temporary_non_const_columnslimit was exceeded. #3788
Improvements:
- The server does not write the processed configuration files to the
/etc/clickhouse-server/directory. Instead, it saves them in thepreprocessed_configsdirectory insidepath. This means that the/etc/clickhouse-server/directory does not have write access for theclickhouseuser, which improves security. #2443 - The
min_merge_bytes_to_use_direct_iooption is set to 10 GiB by default. A merge that forms large parts of tables from the MergeTree family will be performed inO_DIRECTmode, which prevents excessive page cache eviction. #3504 - Accelerated server start when there is a very large number of tables. #3398
- Added a connection pool and HTTP
Keep-Alivefor connections between replicas. #3594 - If the query syntax is invalid, the
400 Bad Requestcode is returned in theHTTPinterface (500 was returned previously). 31bc680a - The
join_default_strictnessoption is set toALLby default for compatibility. 120e2cbe - Removed logging to
stderrfrom there2library for invalid or complex regular expressions. #3723 - Added for the
Kafkatable engine: checks for subscriptions before beginning to read from Kafka; the kafka_max_block_size setting for the table. Marek Vavruša - The
cityHash64,farmHash64,metroHash64,sipHash64,halfMD5,murmurHash2_32,murmurHash2_64,murmurHash3_32, andmurmurHash3_64functions now work for any number of arguments and for arguments in the form of tuples. #3451 #3519 - The
arrayReversefunction now works with any types of arrays. 73e3a7b6 - Added an optional parameter: the slot size for the
timeSlotsfunction. Kirill Shvakov - For
FULLandRIGHT JOIN, themax_block_sizesetting is used for a stream of non-joined data from the right table. Amos Bird - Added the
--securecommand line parameter inclickhouse-benchmarkandclickhouse-performance-testto enable TLS. #3688 #3690 - Type conversion when the structure of a
Buffertype table does not match the structure of the destination table. Vitaly Baranov - Added the
tcp_keep_alive_timeoutoption to enable keep-alive packets after inactivity for the specified time interval. #3441 - Removed unnecessary quoting of values for the partition key in the
system.partstable if it consists of a single column. #3652 - The modulo function works for
DateandDateTimedata types. #3385 - Added synonyms for the
POWER,LN,LCASE,UCASE,REPLACE,LOCATE,SUBSTR, andMIDfunctions. #3774 #3763 Some function names are case-insensitive for compatibility with the SQL standard. Added syntactic sugarSUBSTRING(expr FROM start FOR length)for compatibility with SQL. #3804 - Added the ability to
mlockmemory pages corresponding toclickhouse-serverexecutable code to prevent it from being forced out of memory. This feature is disabled by default. #3553 - Improved performance when reading from
O_DIRECT(with themin_bytes_to_use_direct_iooption enabled). #3405 - Improved performance of the
dictGet...OrDefaultfunction for a constant key argument and a non-constant default argument. Amos Bird - The
firstSignificantSubdomainfunction now processes the domainsgov,mil, andedu. Igor Hatarist Improved performance. #3628 - Ability to specify custom environment variables for starting
clickhouse-serverusing theSYS-V init.dscript by definingCLICKHOUSE_PROGRAM_ENVin/etc/default/clickhouse. Pavlo Bashynskyi - Correct return code for the clickhouse-server init script. #3516
- The
system.metricstable now has theVersionIntegermetric, andsystem.build_optionshas the added lineVERSION_INTEGER, which contains the numeric form of the ClickHouse version, such as18016000. #3644 - Removed the ability to compare the
Datetype with a number to avoid potential errors likedate = 2018-12-17, where quotes around the date are omitted by mistake. #3687 - Fixed the behavior of stateful functions like
rowNumberInAllBlocks. They previously output a result that was one number larger due to starting during query analysis. Amos Bird - If the
force_restore_datafile can’t be deleted, an error message is displayed. Amos Bird
Build Improvements:
- Updated the
jemalloclibrary, which fixes a potential memory leak. Amos Bird - Profiling with
jemallocis enabled by default in order to debug builds. 2cc82f5c - Added the ability to run integration tests when only
Dockeris installed on the system. #3650 - Added the fuzz expression test in SELECT queries. #3442
- Added a stress test for commits, which performs functional tests in parallel and in random order to detect more race conditions. #3438
- Improved the method for starting clickhouse-server in a Docker image. Elghazal Ahmed
- For a Docker image, added support for initializing databases using files in the
/docker-entrypoint-initdb.ddirectory. Konstantin Lebedev - Fixes for builds on ARM. #3709
Backward Incompatible Changes:
- Removed the ability to compare the
Datetype with a number. Instead oftoDate('2018-12-18') = 17883, you must use explicit type conversion= toDate(17883)#3687
ClickHouse Release 18.14
ClickHouse Release 18.14.19, 2018-12-19
Bug Fixes:
- Fixed an error that led to problems with updating dictionaries with the ODBC source. #3825, #3829
- Databases are correctly specified when executing DDL
ON CLUSTERqueries. #3460 - Fixed a segfault if the
max_temporary_non_const_columnslimit was exceeded. #3788
Build Improvements:
- Fixes for builds on ARM.
ClickHouse Release 18.14.18, 2018-12-04
Bug Fixes:
- Fixed error in
dictGet...function for dictionaries of typerange, if one of the arguments is constant and other is not. #3751 - Fixed error that caused messages
netlink: '...': attribute type 1 has an invalid lengthto be printed in Linux kernel log, that was happening only on fresh enough versions of Linux kernel. #3749 - Fixed segfault in function
emptyfor argument ofFixedStringtype. Daniel, Dao Quang Minh - Fixed excessive memory allocation when using large value of
max_query_sizesetting (a memory chunk ofmax_query_sizebytes was preallocated at once). #3720
Build Changes:
- Fixed build with LLVM/Clang libraries of version 7 from the OS packages (these libraries are used for runtime query compilation). #3582
ClickHouse Release 18.14.17, 2018-11-30
Bug Fixes:
- Fixed cases when the ODBC bridge process did not terminate with the main server process. #3642
- Fixed synchronous insertion into the
Distributedtable with a columns list that differs from the column list of the remote table. #3673 - Fixed a rare race condition that can lead to a crash when dropping a MergeTree table. #3643
- Fixed a query deadlock in case when query thread creation fails with the
Resource temporarily unavailableerror. #3643 - Fixed parsing of the
ENGINEclause when theCREATE AS tablesyntax was used and theENGINEclause was specified before theAS table(the error resulted in ignoring the specified engine). #3692
ClickHouse Release 18.14.15, 2018-11-21
Bug Fixes:
- The size of memory chunk was overestimated while deserializing the column of type
Array(String)that leads to "Memory limit exceeded" errors. The issue appeared in version 18.12.13. #3589
ClickHouse Release 18.14.14, 2018-11-20
Bug Fixes:
- Fixed
ON CLUSTERqueries when cluster configured as secure (flag<secure>). #3599
Build Changes:
- Fixed problems (llvm-7 from system, macos) #3582
ClickHouse Release 18.14.13, 2018-11-08
Bug Fixes:
- Fixed the
Block structure mismatch in MergingSorted streamerror. #3162 - Fixed
ON CLUSTERqueries in case when secure connections were turned on in the cluster config (the<secure>flag). #3465 - Fixed an error in queries that used
SAMPLE,PREWHEREand alias columns. #3543 - Fixed a rare
unknown compression methoderror when themin_bytes_to_use_direct_iosetting was enabled. 3544
Performance Improvements:
- Fixed performance regression of queries with
GROUP BYof columns of UInt16 or Date type when executing on AMD EPYC processors. Igor Lapko - Fixed performance regression of queries that process long strings. #3530
Build Improvements:
ClickHouse Release 18.14.12, 2018-11-02
Bug Fixes:
- Fixed a crash on joining two unnamed subqueries. #3505
- Fixed generating incorrect queries (with an empty
WHEREclause) when querying external databases. hotid - Fixed using an incorrect timeout value in ODBC dictionaries. Marek Vavruša
ClickHouse Release 18.14.11, 2018-10-29
Bug Fixes:
- Fixed the error
Block structure mismatch in UNION stream: different number of columnsin LIMIT queries. #2156 - Fixed errors when merging data in tables containing arrays inside Nested structures. #3397
- Fixed incorrect query results if the
merge_tree_uniform_read_distributionsetting is disabled (it is enabled by default). #3429 - Fixed an error on inserts to a Distributed table in Native format. #3411
ClickHouse Release 18.14.10, 2018-10-23
- The
compile_expressionssetting (JIT compilation of expressions) is disabled by default. #3410 - The
enable_optimize_predicate_expressionsetting is disabled by default.
ClickHouse Release 18.14.9, 2018-10-16
New Features:
- The
WITH CUBEmodifier forGROUP BY(the alternative syntaxGROUP BY CUBE(...)is also available). #3172 - Added the
formatDateTimefunction. Alexandr Krasheninnikov - Added the
JDBCtable engine andjdbctable function (requires installing clickhouse-jdbc-bridge). Alexandr Krasheninnikov - Added functions for working with the ISO week number:
toISOWeek,toISOYear,toStartOfISOYear, andtoDayOfYear. #3146 - Now you can use
Nullablecolumns forMySQLandODBCtables. #3362 - Nested data structures can be read as nested objects in
JSONEachRowformat. Added theinput_format_import_nested_jsonsetting. Veloman Yunkan - Parallel processing is available for many
MATERIALIZED VIEWs when inserting data. See theparallel_view_processingsetting. Marek Vavruša - Added the
SYSTEM FLUSH LOGSquery (forced log flushes to system tables such asquery_log) #3321 - Now you can use pre-defined
databaseandtablemacros when declaringReplicatedtables. #3251 - Added the ability to read
Decimaltype values in engineering notation (indicating powers of ten). #3153
Experimental Features:
- Optimization of the GROUP BY clause for
LowCardinality data types.#3138 - Optimized calculation of expressions for
LowCardinality data types.#3200
Improvements:
- Significantly reduced memory consumption for queries with
ORDER BYandLIMIT. See themax_bytes_before_remerge_sortsetting. #3205 - In the absence of
JOIN(LEFT,INNER, …),INNER JOINis assumed. #3147 - Qualified asterisks work correctly in queries with
JOIN. Winter Zhang - The
ODBCtable engine correctly chooses the method for quoting identifiers in the SQL dialect of a remote database. Alexandr Krasheninnikov - The
compile_expressionssetting (JIT compilation of expressions) is enabled by default. - Fixed behavior for simultaneous DROP DATABASE/TABLE IF EXISTS and CREATE DATABASE/TABLE IF NOT EXISTS. Previously, a
CREATE DATABASE ... IF NOT EXISTSquery could return the error message "File … already exists", and theCREATE TABLE ... IF NOT EXISTSandDROP TABLE IF EXISTSqueries could returnTable ... is creating or attaching right now. #3101 - LIKE and IN expressions with a constant right half are passed to the remote server when querying from MySQL or ODBC tables. #3182
- Comparisons with constant expressions in a WHERE clause are passed to the remote server when querying from MySQL and ODBC tables. Previously, only comparisons with constants were passed. #3182
- Correct calculation of row width in the terminal for
Prettyformats, including strings with hieroglyphs. Amos Bird. ON CLUSTERcan be specified forALTER UPDATEqueries.- Improved performance for reading data in
JSONEachRowformat. #3332 - Added synonyms for the
LENGTHandCHARACTER_LENGTHfunctions for compatibility. TheCONCATfunction is no longer case-sensitive. #3306 - Added the
TIMESTAMPsynonym for theDateTimetype. #3390 - There is always space reserved for query_id in the server logs, even if the log line is not related to a query. This makes it easier to parse server text logs with third-party tools.
- Memory consumption by a query is logged when it exceeds the next level of an integer number of gigabytes. #3205
- Added compatibility mode for the case when the client library that uses the Native protocol sends fewer columns by mistake than the server expects for the INSERT query. This scenario was possible when using the clickhouse-cpp library. Previously, this scenario caused the server to crash. #3171
- In a user-defined WHERE expression in
clickhouse-copier, you can now use apartition_keyalias (for additional filtering by source table partition). This is useful if the partitioning scheme changes during copying, but only changes slightly. #3166 - The workflow of the
Kafkaengine has been moved to a background thread pool in order to automatically reduce the speed of data reading at high loads. Marek Vavruša. - Support for reading
TupleandNestedvalues of structures likestructin theCap'n'Proto format. Marek Vavruša - The list of top-level domains for the
firstSignificantSubdomainfunction now includes the domainbiz. decaseal - In the configuration of external dictionaries,
null_valueis interpreted as the value of the default data type. #3330 - Support for the
intDivandintDivOrZerofunctions forDecimal. b48402e8 - Support for the
Date,DateTime,UUID, andDecimaltypes as a key for thesumMapaggregate function. #3281 - Support for the
Decimaldata type in external dictionaries. #3324 - Support for the
Decimaldata type inSummingMergeTreetables. #3348 - Added specializations for
UUIDinif. #3366 - Reduced the number of
openandclosesystem calls when reading from aMergeTree table. #3283 - A
TRUNCATE TABLEquery can be executed on any replica (the query is passed to the leader replica). Kirill Shvakov
Bug Fixes:
- Fixed an issue with
Dictionarytables forrange_hasheddictionaries. This error occurred in version 18.12.17. #1702 - Fixed an error when loading
range_hasheddictionaries (the messageUnsupported type Nullable (...)). This error occurred in version 18.12.17. #3362 - Fixed errors in the
pointInPolygonfunction due to the accumulation of inaccurate calculations for polygons with a large number of vertices located close to each other. #3331 #3341 - If after merging data parts, the checksum for the resulting part differs from the result of the same merge in another replica, the result of the merge is deleted and the data part is downloaded from the other replica (this is the correct behavior). But after downloading the data part, it couldn’t be added to the working set because of an error that the part already exists (because the data part was deleted with some delay after the merge). This led to cyclical attempts to download the same data. #3194
- Fixed incorrect calculation of total memory consumption by queries (because of incorrect calculation, the
max_memory_usage_for_all_queriessetting worked incorrectly and theMemoryTrackingmetric had an incorrect value). This error occurred in version 18.12.13. Marek Vavruša - Fixed the functionality of
CREATE TABLE ... ON CLUSTER ... AS SELECT ...This error occurred in version 18.12.13. #3247 - Fixed unnecessary preparation of data structures for
JOINs on the server that initiates the query if theJOINis only performed on remote servers. #3340 - Fixed bugs in the
Kafkaengine: deadlocks after exceptions when starting to read data, and locks upon completion Marek Vavruša. - For
Kafkatables, the optionalschemaparameter was not passed (the schema of theCap'n'Protoformat). Vojtech Splichal - If the ensemble of ZooKeeper servers has servers that accept the connection but then immediately close it instead of responding to the handshake, ClickHouse chooses to connect another server. Previously, this produced the error
Cannot read all data. Bytes read: 0. Bytes expected: 4.and the server couldn’t start. 8218cf3a - If the ensemble of ZooKeeper servers contains servers for which the DNS query returns an error, these servers are ignored. 17b8e209
- Fixed type conversion between
DateandDateTimewhen inserting data in theVALUESformat (ifinput_format_values_interpret_expressions = 1). Previously, the conversion was performed between the numerical value of the number of days in Unix Epoch time and the Unix timestamp, which led to unexpected results. #3229 - Corrected type conversion between
Decimaland integer numbers. #3211 - Fixed errors in the
enable_optimize_predicate_expressionsetting. Winter Zhang - Fixed a parsing error in CSV format with floating-point numbers if a non-default CSV separator is used, such as
;#3155 - Fixed the
arrayCumSumNonNegativefunction (it does not accumulate negative values if the accumulator is less than zero). Aleksey Studnev - Fixed how
Mergetables work on top ofDistributedtables when usingPREWHERE. #3165 - Bug fixes in the
ALTER UPDATEquery. - Fixed bugs in the
odbctable function that appeared in version 18.12. #3197 - Fixed the operation of aggregate functions with
StateArraycombinators. #3188 - Fixed a crash when dividing a
Decimalvalue by zero. 69dd6609 - Fixed output of types for operations using
Decimaland integer arguments. #3224 - Fixed the segfault during
GROUP BYonDecimal128. 3359ba06 - The
log_query_threadssetting (logging information about each thread of query execution) now takes effect only if thelog_queriesoption (logging information about queries) is set to 1. Since thelog_query_threadsoption is enabled by default, information about threads was previously logged even if query logging was disabled. #3241 - Fixed an error in the distributed operation of the quantiles aggregate function (the error message
Not found column quantile...). 292a8855 - Fixed the compatibility problem when working on a cluster of version 18.12.17 servers and older servers at the same time. For distributed queries with GROUP BY keys of both fixed and non-fixed length, if there was a large amount of data to aggregate, the returned data was not always fully aggregated (two different rows contained the same aggregation keys). #3254
- Fixed handling of substitutions in
clickhouse-performance-test, if the query contains only part of the substitutions declared in the test. #3263 - Fixed an error when using
FINALwithPREWHERE. #3298 - Fixed an error when using
PREWHEREover columns that were added duringALTER. #3298 - Added a check for the absence of
arrayJoinforDEFAULTandMATERIALIZEDexpressions. Previously,arrayJoinled to an error when inserting data. #3337 - Added a check for the absence of
arrayJoinin aPREWHEREclause. Previously, this led to messages likeSize ... does not matchorUnknown compression methodwhen executing queries. #3357 - Fixed segfault that could occur in rare cases after optimization that replaced AND chains from equality evaluations with the corresponding IN expression. liuyimin-bytedance
- Minor corrections to
clickhouse-benchmark: previously, client information was not sent to the server; now the number of queries executed is calculated more accurately when shutting down and for limiting the number of iterations. #3351 #3352
Backward Incompatible Changes:
- Removed the
allow_experimental_decimal_typeoption. TheDecimaldata type is available for default use. #3329
ClickHouse Release 18.12
ClickHouse Release 18.12.17, 2018-09-16
New Features:
invalidate_query(the ability to specify a query to check whether an external dictionary needs to be updated) is implemented for theclickhousesource. #3126- Added the ability to use
UInt*,Int*, andDateTimedata types (along with theDatetype) as arange_hashedexternal dictionary key that defines the boundaries of ranges. NowNULLcan be used to designate an open range. Vasily Nemkov - The
Decimaltype now supportsvar*andstddev*aggregate functions. #3129 - The
Decimaltype now supports mathematical functions (exp,sinand so on.) #3129 - The
system.part_logtable now has thepartition_idcolumn. #3089
Bug Fixes:
Mergenow works correctly onDistributedtables. Winter Zhang- Fixed incompatibility (unnecessary dependency on the
glibcversion) that made it impossible to run ClickHouse onUbuntu Preciseand older versions. The incompatibility arose in version 18.12.13. #3130 - Fixed errors in the
enable_optimize_predicate_expressionsetting. Winter Zhang - Fixed a minor issue with backwards compatibility that appeared when working with a cluster of replicas on versions earlier than 18.12.13 and simultaneously creating a new replica of a table on a server with a newer version (shown in the message
Can not clone replica, because the ... updated to new ClickHouse version, which is logical, but shouldn’t happen). #3122
Backward Incompatible Changes:
- The
enable_optimize_predicate_expressionoption is enabled by default (which is rather optimistic). If query analysis errors occur that are related to searching for the column names, setenable_optimize_predicate_expressionto 0. Winter Zhang
ClickHouse Release 18.12.14, 2018-09-13
New Features:
- Added support for
ALTER UPDATEqueries. #3035 - Added the
allow_ddloption, which restricts the user’s access to DDL queries. #3104 - Added the
min_merge_bytes_to_use_direct_iooption forMergeTreeengines, which allows you to set a threshold for the total size of the merge (when above the threshold, data part files will be handled using O_DIRECT). #3117 - The
system.mergessystem table now contains thepartition_idcolumn. #3099
Improvements
- If a data part remains unchanged during mutation, it isn’t downloaded by replicas. #3103
- Autocomplete is available for names of settings when working with
clickhouse-client. #3106
Bug Fixes:
- Added a check for the sizes of arrays that are elements of
Nestedtype fields when inserting. #3118 - Fixed an error updating external dictionaries with the
ODBCsource andhashedstorage. This error occurred in version 18.12.13. - Fixed a crash when creating a temporary table from a query with an
INcondition. Winter Zhang - Fixed an error in aggregate functions for arrays that can have
NULLelements. Winter Zhang
ClickHouse Release 18.12.13, 2018-09-10
New Features:
- Added the
DECIMAL(digits, scale)data type (Decimal32(scale),Decimal64(scale),Decimal128(scale)). To enable it, use the settingallow_experimental_decimal_type. #2846 #2970 #3008 #3047 - New
WITH ROLLUPmodifier forGROUP BY(alternative syntax:GROUP BY ROLLUP(...)). #2948 - In queries with JOIN, the star character expands to a list of columns in all tables, in compliance with the SQL standard. You can restore the old behavior by setting
asterisk_left_columns_onlyto 1 on the user configuration level. Winter Zhang - Added support for JOIN with table functions. Winter Zhang
- Autocomplete by pressing Tab in clickhouse-client. Sergey Shcherbin
- Ctrl+C in clickhouse-client clears a query that was entered. #2877
- Added the
join_default_strictnesssetting (values:",'any','all'). This allows you to not specifyANYorALLforJOIN. #2982 - Each line of the server log related to query processing shows the query ID. #2482
- Now you can get query execution logs in clickhouse-client (use the
send_logs_levelsetting). With distributed query processing, logs are cascaded from all the servers. #2482 - The
system.query_logandsystem.processes(SHOW PROCESSLIST) tables now have information about all changed settings when you run a query (the nested structure of theSettingsdata). Added thelog_query_settingssetting. #2482 - The
system.query_logandsystem.processestables now show information about the number of threads that are participating in query execution (see thethread_numberscolumn). #2482 - Added
ProfileEventscounters that measure the time spent on reading and writing over the network and reading and writing to disk, the number of network errors, and the time spent waiting when network bandwidth is limited. #2482 - Added
ProfileEventscounters that contain the system metrics from rusage (you can use them to get information about CPU usage in userspace and the kernel, page faults, and context switches), as well as taskstats metrics (use these to obtain information about I/O wait time, CPU wait time, and the amount of data read and recorded, both with and without page cache). #2482 - The
ProfileEventscounters are applied globally and for each query, as well as for each query execution thread, which allows you to profile resource consumption by query in detail. #2482 - Added the
system.query_thread_logtable, which contains information about each query execution thread. Added thelog_query_threadssetting. #2482 - The
system.metricsandsystem.eventstables now have built-in documentation. #3016 - Added the
arrayEnumerateDensefunction. Amos Bird - Added the
arrayCumSumNonNegativeandarrayDifferencefunctions. Aleksey Studnev - Added the
retentionaggregate function. Sundy Li - Now you can add (merge) states of aggregate functions by using the plus operator, and multiply the states of aggregate functions by a nonnegative constant. #3062 #3034
- Tables in the MergeTree family now have the virtual column
_partition_id. #3089
Experimental Features:
- Added the
LowCardinality(T)data type. This data type automatically creates a local dictionary of values and allows data processing without unpacking the dictionary. #2830 - Added a cache of JIT-compiled functions and a counter for the number of uses before compiling. To JIT compile expressions, enable the
compile_expressionssetting. #2990 #3077
Improvements:
- Fixed the problem with unlimited accumulation of the replication log when there are abandoned replicas. Added an effective recovery mode for replicas with a long lag.
- Improved performance of
GROUP BYwith multiple aggregation fields when one of them is string and the others are fixed length. - Improved performance when using
PREWHEREand with implicit transfer of expressions inPREWHERE. - Improved parsing performance for text formats (
CSV,TSV). Amos Bird #2980 - Improved performance of reading strings and arrays in binary formats. Amos Bird
- Increased performance and reduced memory consumption for queries to
system.tablesandsystem.columnswhen there is a very large number of tables on a single server. #2953 - Fixed a performance problem in the case of a large stream of queries that result in an error (the
_dl_addrfunction is visible inperf top, but the server isn’t using much CPU). #2938 - Conditions are cast into the View (when
enable_optimize_predicate_expressionis enabled). Winter Zhang - Improvements to the functionality for the
UUIDdata type. #3074 #2985 - The
UUIDdata type is supported in The-Alchemist dictionaries. #2822 - The
visitParamExtractRawfunction works correctly with nested structures. Winter Zhang - When the
input_format_skip_unknown_fieldssetting is enabled, object fields inJSONEachRowformat are skipped correctly. BlahGeek - For a
CASEexpression with conditions, you can now omitELSE, which is equivalent toELSE NULL. #2920 - The operation timeout can now be configured when working with ZooKeeper. urykhy
- You can specify an offset for
LIMIT n, masLIMIT n OFFSET m. #2840 - You can use the
SELECT TOP nsyntax as an alternative forLIMIT. #2840 - Increased the size of the queue to write to system tables, so the
SystemLog parameter queue is fullerror does not happen as often. - The
windowFunnelaggregate function now supports events that meet multiple conditions. Amos Bird - Duplicate columns can be used in a
USINGclause forJOIN. #3006 Prettyformats now have a limit on column alignment by width. Use theoutput_format_pretty_max_column_pad_widthsetting. If a value is wider, it will still be displayed in its entirety, but the other cells in the table will not be too wide. #3003- The
odbctable function now allows you to specify the database/schema name. Amos Bird - Added the ability to use a username specified in the
clickhouse-clientconfig file. Vladimir Kozbin - The
ZooKeeperExceptionscounter has been split into three counters:ZooKeeperUserExceptions,ZooKeeperHardwareExceptions, andZooKeeperOtherExceptions. ALTER DELETEqueries work for materialized views.- Added randomization when running the cleanup thread periodically for
ReplicatedMergeTreetables in order to avoid periodic load spikes when there are a very large number ofReplicatedMergeTreetables. - Support for
ATTACH TABLE ... ON CLUSTERqueries. #3025
Bug Fixes:
- Fixed an issue with
Dictionarytables (throws theSize of offsets does not match size of columnorUnknown compression methodexception). This bug appeared in version 18.10.3. #2913 - Fixed a bug when merging
CollapsingMergeTreetables if one of the data parts is empty (these parts are formed during merge orALTER DELETEif all data was deleted), and theverticalalgorithm was used for the merge. #3049 - Fixed a race condition during
DROPorTRUNCATEforMemorytables with a simultaneousSELECT, which could lead to server crashes. This bug appeared in version 1.1.54388. #3038 - Fixed the possibility of data loss when inserting in
Replicatedtables if theSession is expirederror is returned (data loss can be detected by theReplicatedDataLossmetric). This error occurred in version 1.1.54378. #2939 #2949 #2964 - Fixed a segfault during
JOIN ... ON. #3000 - Fixed the error searching column names when the
WHEREexpression consists entirely of a qualified column name, such asWHERE table.column. #2994 - Fixed the "Not found column" error that occurred when executing distributed queries if a single column consisting of an IN expression with a subquery is requested from a remote server. #3087
- Fixed the
Block structure mismatch in UNION stream: different number of columnserror that occurred for distributed queries if one of the shards is local and the other is not, and optimization of the move toPREWHEREis triggered. #2226 #3037 #3055 #3065 #3073 #3090 #3093 - Fixed the
pointInPolygonfunction for certain cases of non-convex polygons. #2910 - Fixed the incorrect result when comparing
nanwith integers. #3024 - Fixed an error in the
zlib-nglibrary that could lead to segfault in rare cases. #2854 - Fixed a memory leak when inserting into a table with
AggregateFunctioncolumns, if the state of the aggregate function is not simple (allocates memory separately), and if a single insertion request results in multiple small blocks. #3084 - Fixed a race condition when creating and deleting the same
BufferorMergeTreetable simultaneously. - Fixed the possibility of a segfault when comparing tuples made up of certain non-trivial types, such as tuples. #2989
- Fixed the possibility of a segfault when running certain
ON CLUSTERqueries. Winter Zhang - Fixed an error in the
arrayDistinctfunction forNullablearray elements. #2845 #2937 - The
enable_optimize_predicate_expressionoption now correctly supports cases withSELECT *. Winter Zhang - Fixed the segfault when re-initializing the ZooKeeper session. #2917
- Fixed potential blocking when working with ZooKeeper.
- Fixed incorrect code for adding nested data structures in a
SummingMergeTree. - When allocating memory for states of aggregate functions, alignment is correctly taken into account, which makes it possible to use operations that require alignment when implementing states of aggregate functions. chenxing-xc
Security Fix:
- Safe use of ODBC data sources. Interaction with ODBC drivers uses a separate
clickhouse-odbc-bridgeprocess. Errors in third-party ODBC drivers no longer cause problems with server stability or vulnerabilities. #2828 #2879 #2886 #2893 #2921 - Fixed incorrect validation of the file path in the
catBoostPooltable function. #2894 - The contents of system tables (
tables,databases,parts,columns,parts_columns,merges,mutations,replicas, andreplication_queue) are filtered according to the user’s configured access to databases (allow_databases). Winter Zhang
Backward Incompatible Changes:
- In queries with JOIN, the star character expands to a list of columns in all tables, in compliance with the SQL standard. You can restore the old behavior by setting
asterisk_left_columns_onlyto 1 on the user configuration level.
Build Changes:
- Most integration tests can now be run by commit.
- Code style checks can also be run by commit.
- The
memcpyimplementation is chosen correctly when building on CentOS7/Fedora. Etienne Champetier - When using clang to build, some warnings from
-Weverythinghave been added, in addition to the regular-Wall-Wextra -Werror. #2957 - Debugging the build uses the
jemallocdebug option. - The interface of the library for interacting with ZooKeeper is declared abstract. #2950
ClickHouse Release 18.10
ClickHouse Release 18.10.3, 2018-08-13
New Features:
- HTTPS can be used for replication. #2760
- Added the functions
murmurHash2_64,murmurHash3_32,murmurHash3_64, andmurmurHash3_128in addition to the existingmurmurHash2_32. #2791 - Support for Nullable types in the ClickHouse ODBC driver (
ODBCDriver2output format). #2834 - Support for
UUIDin the key columns.
Improvements:
- Clusters can be removed without restarting the server when they are deleted from the config files. #2777
- External dictionaries can be removed without restarting the server when they are removed from config files. #2779
- Added
SETTINGSsupport for theKafkatable engine. Alexander Marshalov - Improvements for the
UUIDdata type (not yet complete). #2618 - Support for empty parts after merges in the
SummingMergeTree,CollapsingMergeTreeandVersionedCollapsingMergeTreeengines. #2815 - Old records of completed mutations are deleted (
ALTER DELETE). #2784 - Added the
system.merge_tree_settingstable. Kirill Shvakov - The
system.tablestable now has dependency columns:dependencies_databaseanddependencies_table. Winter Zhang - Added the
max_partition_size_to_dropconfig option. #2782 - Added the
output_format_json_escape_forward_slashesoption. Alexander Bocharov - Added the
max_fetch_partition_retries_countsetting. #2831 - Added the
prefer_localhost_replicasetting for disabling the preference for a local replica and going to a local replica without inter-process interaction. #2832 - The
quantileExactaggregate function returnsnanin the case of aggregation on an emptyFloat32orFloat64set. Sundy Li
Bug Fixes:
- Removed unnecessary escaping of the connection string parameters for ODBC, which made it impossible to establish a connection. This error occurred in version 18.6.0.
- Fixed the logic for processing
REPLACE PARTITIONcommands in the replication queue. If there are twoREPLACEcommands for the same partition, the incorrect logic could cause one of them to remain in the replication queue and not be executed. #2814 - Fixed a merge bug when all data parts were empty (parts that were formed from a merge or from
ALTER DELETEif all data was deleted). This bug appeared in version 18.1.0. #2930 - Fixed an error for concurrent
SetorJoin. Amos Bird - Fixed the
Block structure mismatch in UNION stream: different number of columnserror that occurred forUNION ALLqueries inside a sub-query if one of theSELECTqueries contains duplicate column names. Winter Zhang - Fixed a memory leak if an exception occurred when connecting to a MySQL server.
- Fixed incorrect clickhouse-client response code in case of a query error.
- Fixed incorrect behavior of materialized views containing DISTINCT. #2795
Backward Incompatible Changes
- Removed support for CHECK TABLE queries for Distributed tables.
Build Changes:
- The allocator has been replaced:
jemallocis now used instead oftcmalloc. In some scenarios, this increases speed up to 20%. However, there are queries that have slowed by up to 20%. Memory consumption has been reduced by approximately 10% in some scenarios, with improved stability. With highly competitive loads, CPU usage in userspace and in system shows just a slight increase. #2773 - Use of libressl from a submodule. #1983 #2807
- Use of unixodbc from a submodule. #2789
- Use of mariadb-connector-c from a submodule. #2785
- Added functional test files to the repository that depend on the availability of test data (for the time being, without the test data itself).
ClickHouse Release 18.6
ClickHouse Release 18.6.0, 2018-08-02
New Features:
- Added support for ON expressions for the JOIN ON syntax:
JOIN ON Expr([table.]column ...) = Expr([table.]column, ...) [AND Expr([table.]column, ...) = Expr([table.]column, ...) ...]The expression must be a chain of equalities joined by the AND operator. Each side of the equality can be an arbitrary expression over the columns of one of the tables. The use of fully qualified column names is supported (table.name,database.table.name,table_alias.name,subquery_alias.name) for the right table. #2742 - HTTPS can be enabled for replication. #2760
Improvements:
- The server passes the patch component of its version to the client. Data about the patch version component is in
system.processesandquery_log. #2646
ClickHouse Release 18.5
ClickHouse Release 18.5.1, 2018-07-31
New Features:
- Added the hash function
murmurHash2_32#2756.
Improvements:
- Now you can use the
from_env#2741 attribute to set values in config files from environment variables. - Added case-insensitive versions of the
coalesce,ifNull, andnullIf functions#2752.
Bug Fixes:
- Fixed a possible bug when starting a replica #2759.
ClickHouse Release 18.4
ClickHouse Release 18.4.0, 2018-07-28
New Features:
- Added system tables:
formats,data_type_families,aggregate_function_combinators,table_functions,table_engines,collations#2721. - Added the ability to use a table function instead of a table as an argument of a
remoteorcluster table function#2708. - Support for
HTTP Basicauthentication in the replication protocol #2727. - The
hasfunction now allows searching for a numeric value in an array ofEnumvalues Maxim Khrisanfov. - Support for adding arbitrary message separators when reading from
KafkaAmos Bird.
Improvements:
- The
ALTER TABLE t DELETE WHEREquery does not rewrite data parts that were not affected by the WHERE condition #2694. - The
use_minimalistic_checksums_in_zookeeperoption forReplicatedMergeTreetables is enabled by default. This setting was added in version 1.1.54378, 2018-04-16. Versions that are older than 1.1.54378 can no longer be installed. - Support for running
KILLandOPTIMIZEqueries that specifyON CLUSTERWinter Zhang.
Bug Fixes:
- Fixed the error
Column ... is not under an aggregate function and not in GROUP BYfor aggregation with an IN expression. This bug appeared in version 18.1.0. (bbdd780b) - Fixed a bug in the
windowFunnel aggregate functionWinter Zhang. - Fixed a bug in the
anyHeavyaggregate function (a2101df2) - Fixed server crash when using the
countArray()aggregate function.
Backward Incompatible Changes:
- Parameters for
Kafkaengine was changed fromKafka(kafka_broker_list, kafka_topic_list, kafka_group_name, kafka_format[, kafka_schema, kafka_num_consumers])toKafka(kafka_broker_list, kafka_topic_list, kafka_group_name, kafka_format[, kafka_row_delimiter, kafka_schema, kafka_num_consumers]). If your tables usekafka_schemaorkafka_num_consumersparameters, you have to manually edit the metadata filespath/metadata/database/table.sqland addkafka_row_delimiterparameter with''value.
ClickHouse Release 18.1
ClickHouse Release 18.1.0, 2018-07-23
New Features:
- Support for the
ALTER TABLE t DELETE WHEREquery for non-replicated MergeTree tables (#2634). - Support for arbitrary types for the
uniq*family of aggregate functions (#2010). - Support for arbitrary types in comparison operators (#2026).
- The
users.xmlfile allows setting a subnet mask in the format10.0.0.1/255.255.255.0. This is necessary for using masks for IPv6 networks with zeros in the middle (#2637). - Added the
arrayDistinctfunction (#2670). - The SummingMergeTree engine can now work with AggregateFunction type columns (Constantin S. Pan).
Improvements:
- Changed the numbering scheme for release versions. Now the first part contains the year of release (A.D., Moscow timezone, minus 2000), the second part contains the number for major changes (increases for most releases), and the third part is the patch version. Releases are still backward compatible, unless otherwise stated in the changelog.
- Faster conversions of floating-point numbers to a string (Amos Bird).
- If some rows were skipped during an insert due to parsing errors (this is possible with the
input_allow_errors_numandinput_allow_errors_ratiosettings enabled), the number of skipped rows is now written to the server log (Leonardo Cecchi).
Bug Fixes:
- Fixed the TRUNCATE command for temporary tables (Amos Bird).
- Fixed a rare deadlock in the ZooKeeper client library that occurred when there was a network error while reading the response (c315200).
- Fixed an error during a CAST to Nullable types (#1322).
- Fixed the incorrect result of the
maxIntersection()function when the boundaries of intervals coincided (Michael Furmur). - Fixed incorrect transformation of the OR expression chain in a function argument (chenxing-xc).
- Fixed performance degradation for queries containing
IN (subquery)expressions inside another subquery (#2571). - Fixed incompatibility between servers with different versions in distributed queries that use a
CASTfunction that isn’t in uppercase letters (fe8c4d6). - Added missing quoting of identifiers for queries to an external DBMS (#2635).
Backward Incompatible Changes:
- Converting a string containing the number zero to DateTime does not work. Example:
SELECT toDateTime('0'). This is also the reason thatDateTime DEFAULT '0'does not work in tables, as well as<null_value>0</null_value>in dictionaries. Solution: replace0with0000-00-00 00:00:00.
ClickHouse Release 1.1
ClickHouse Release 1.1.54394, 2018-07-12
New Features:
- Added the
histogramaggregate function (Mikhail Surin). - Now
OPTIMIZE TABLE ... FINALcan be used without specifying partitions forReplicatedMergeTree(Amos Bird).
Bug Fixes:
- Fixed a problem with a very small timeout for sockets (one second) for reading and writing when sending and downloading replicated data, which made it impossible to download larger parts if there is a load on the network or disk (it resulted in cyclical attempts to download parts). This error occurred in version 1.1.54388.
- Fixed issues when using chroot in ZooKeeper if you inserted duplicate data blocks in the table.
- The
hasfunction now works correctly for an array with Nullable elements (#2115). - The
system.tablestable now works correctly when used in distributed queries. Themetadata_modification_timeandengine_fullcolumns are now non-virtual. Fixed an error that occurred if only these columns were queried from the table. - Fixed how an empty
TinyLogtable works after inserting an empty data block (#2563). - The
system.zookeepertable works if the value of the node in ZooKeeper is NULL.
ClickHouse Release 1.1.54390, 2018-07-06
New Features:
- Queries can be sent in
multipart/form-dataformat (in thequeryfield), which is useful if external data is also sent for query processing (Olga Hvostikova). - Added the ability to enable or disable processing single or double quotes when reading data in CSV format. You can configure this in the
format_csv_allow_single_quotesandformat_csv_allow_double_quotessettings (Amos Bird). - Now
OPTIMIZE TABLE ... FINALcan be used without specifying the partition for non-replicated variants ofMergeTree(Amos Bird).
Improvements:
- Improved performance, reduced memory consumption, and correct memory consumption tracking with use of the IN operator when a table index could be used (#2584).
- Removed redundant checking of checksums when adding a data part. This is important when there are a large number of replicas, because in these cases the total number of checks was equal to N^2.
- Added support for
Array(Tuple(...))arguments for thearrayEnumerateUniqfunction (#2573). - Added
Nullablesupport for therunningDifferencefunction (#2594). - Improved query analysis performance when there is a very large number of expressions (#2572).
- Faster selection of data parts for merging in
ReplicatedMergeTreetables. Faster recovery of the ZooKeeper session (#2597). - The
format_version.txtfile forMergeTreetables is re-created if it is missing, which makes sense if ClickHouse is launched after copying the directory structure without files (Ciprian Hacman).
Bug Fixes:
- Fixed a bug when working with ZooKeeper that could make it impossible to recover the session and readonly states of tables before restarting the server.
- Fixed a bug when working with ZooKeeper that could result in old nodes not being deleted if the session is interrupted.
- Fixed an error in the
quantileTDigestfunction for Float arguments (this bug was introduced in version 1.1.54388) (Mikhail Surin). - Fixed a bug in the index for MergeTree tables if the primary key column is located inside the function for converting types between signed and unsigned integers of the same size (#2603).
- Fixed segfault if
macrosare used but they aren’t in the config file (#2570). - Fixed switching to the default database when reconnecting the client (#2583).
- Fixed a bug that occurred when the
use_index_for_in_with_subqueriessetting was disabled.
Security Fix:
- Sending files is no longer possible when connected to MySQL (
LOAD DATA LOCAL INFILE).
ClickHouse Release 1.1.54388, 2018-06-28
New Features:
- Support for the
ALTER TABLE t DELETE WHEREquery for replicated tables. Added thesystem.mutationstable to track progress of this type of queries. - Support for the
ALTER TABLE t [REPLACE|ATTACH] PARTITIONquery for *MergeTree tables. - Support for the
TRUNCATE TABLEquery (Winter Zhang) - Several new
SYSTEMqueries for replicated tables (RESTART REPLICAS,SYNC REPLICA,[STOP|START] [MERGES|FETCHES|SENDS REPLICATED|REPLICATION QUEUES]). - Added the ability to write to a table with the MySQL engine and the corresponding table function (sundy-li).
- Added the
url()table function and theURLtable engine (Alexander Sapin). - Added the
windowFunnelaggregate function (sundy-li). - New
startsWithandendsWithfunctions for strings (Vadim Plakhtinsky). - The
numbers()table function now allows you to specify the offset (Winter Zhang). - The password to
clickhouse-clientcan be entered interactively. - Server logs can now be sent to syslog (Alexander Krasheninnikov).
- Support for logging in dictionaries with a shared library source (Alexander Sapin).
- Support for custom CSV delimiters (Ivan Zhukov)
- Added the
date_time_input_formatsetting. If you switch this setting to'best_effort', DateTime values will be read in a wide range of formats. - Added the
clickhouse-obfuscatorutility for data obfuscation. Usage example: publishing data used in performance tests.
Experimental Features:
- Added the ability to calculate
andarguments only where they are needed (Anastasia Tsarkova) - JIT compilation to native code is now available for some expressions (pyos).
Bug Fixes:
- Duplicates no longer appear for a query with
DISTINCTandORDER BY. - Queries with
ARRAY JOINandarrayFilterno longer return an incorrect result. - Fixed an error when reading an array column from a Nested structure (#2066).
- Fixed an error when analyzing queries with a HAVING clause like
HAVING tuple IN (...). - Fixed an error when analyzing queries with recursive aliases.
- Fixed an error when reading from ReplacingMergeTree with a condition in PREWHERE that filters all rows (#2525).
- User profile settings were not applied when using sessions in the HTTP interface.
- Fixed how settings are applied from the command line parameters in clickhouse-local.
- The ZooKeeper client library now uses the session timeout received from the server.
- Fixed a bug in the ZooKeeper client library when the client waited for the server response longer than the timeout.
- Fixed pruning of parts for queries with conditions on partition key columns (#2342).
- Merges are now possible after
CLEAR COLUMN IN PARTITION(#2315). - Type mapping in the ODBC table function has been fixed (sundy-li).
- Type comparisons have been fixed for
DateTimewith and without the time zone (Alexander Bocharov). - Fixed syntactic parsing and formatting of the
CASToperator. - Fixed insertion into a materialized view for the Distributed table engine (Babacar Diassé).
- Fixed a race condition when writing data from the
Kafkaengine to materialized views (Yangkuan Liu). - Fixed SSRF in the remote() table function.
- Fixed exit behavior of
clickhouse-clientin multiline mode (#2510).
Improvements:
- Background tasks in replicated tables are now performed in a thread pool instead of in separate threads (Silviu Caragea).
- Improved LZ4 compression performance.
- Faster analysis for queries with a large number of JOINs and sub-queries.
- The DNS cache is now updated automatically when there are too many network errors.
- Table inserts no longer occur if the insert into one of the materialized views is not possible because it has too many parts.
- Corrected the discrepancy in the event counters
Query,SelectQuery, andInsertQuery. - Expressions like
tuple IN (SELECT tuple)are allowed if the tuple types match. - A server with replicated tables can start even if you haven’t configured ZooKeeper.
- When calculating the number of available CPU cores, limits on cgroups are now taken into account (Atri Sharma).
- Added chown for config directories in the systemd config file (Mikhail Shiryaev).
Build Changes:
- The gcc8 compiler can be used for builds.
- Added the ability to build llvm from submodule.
- The version of the librdkafka library has been updated to v0.11.4.
- Added the ability to use the system libcpuid library. The library version has been updated to 0.4.0.
- Fixed the build using the vectorclass library (Babacar Diassé).
- Cmake now generates files for ninja by default (like when using
-G Ninja). - Added the ability to use the libtinfo library instead of libtermcap (Georgy Kondratiev).
- Fixed a header file conflict in Fedora Rawhide (#2520).
Backward Incompatible Changes:
- Removed escaping in
VerticalandPretty*formats and deleted theVerticalRawformat. - If servers with version 1.1.54388 (or newer) and servers with an older version are used simultaneously in a distributed query and the query has the
cast(x, 'Type')expression without theASkeyword and does not have the wordcastin uppercase, an exception will be thrown with a message likeNot found column cast(0, 'UInt8') in block. Solution: Update the server on the entire cluster.
ClickHouse Release 1.1.54385, 2018-06-01
Bug Fixes:
- Fixed an error that in some cases caused ZooKeeper operations to block.
ClickHouse Release 1.1.54383, 2018-05-22
Bug Fixes:
- Fixed a slowdown of replication queue if a table has many replicas.
ClickHouse Release 1.1.54381, 2018-05-14
Bug Fixes:
- Fixed a nodes leak in ZooKeeper when ClickHouse loses connection to ZooKeeper server.
ClickHouse Release 1.1.54380, 2018-04-21
New Features:
- Added the table function
file(path, format, structure). An example reading bytes from/dev/urandom:ln -s /dev/urandom /var/lib/clickhouse/user_files/random``clickhouse-client -q "SELECT * FROM file('random', 'RowBinary', 'd UInt8') LIMIT 10".
Improvements:
- Subqueries can be wrapped in
()brackets to enhance query readability. For example:(SELECT 1) UNION ALL (SELECT 1). - Simple
SELECTqueries from thesystem.processestable are not included in themax_concurrent_querieslimit.
Bug Fixes:
- Fixed incorrect behavior of the
INoperator when select fromMATERIALIZED VIEW. - Fixed incorrect filtering by partition index in expressions like
partition_key_column IN (...). - Fixed inability to execute
OPTIMIZEquery on non-leader replica ifREANAMEwas performed on the table. - Fixed the authorization error when executing
OPTIMIZEorALTERqueries on a non-leader replica. - Fixed freezing of
KILL QUERY. - Fixed an error in ZooKeeper client library which led to loss of watches, freezing of distributed DDL queue, and slowdowns in the replication queue if a non-empty
chrootprefix is used in the ZooKeeper configuration.
Backward Incompatible Changes:
- Removed support for expressions like
(a, b) IN (SELECT (a, b))(you can use the equivalent expression(a, b) IN (SELECT a, b)). In previous releases, these expressions led to undeterminedWHEREfiltering or caused errors.
ClickHouse Release 1.1.54378, 2018-04-16
New Features:
- 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 canceledexception instead of an incomplete result.
Improvements:
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(谢磊).
Bug Fixes:
- 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.
Build Changes:
- The build supports
ninjainstead ofmakeand usesninjaby default for building releases. - Renamed packages:
clickhouse-server-baseinclickhouse-common-static;clickhouse-server-commoninclickhouse-server;clickhouse-common-dbginclickhouse-common-static-dbg. To install, useclickhouse-server clickhouse-client. Packages with the old names will still load in the repositories for backward compatibility.
Backward Incompatible Changes:
- 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.
ClickHouse Release 1.1.54370, 2018-03-16
New Features:
- 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).
Improvements:
- 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 data sets. Example:
WITH (1, 2, 3) AS set SELECT number IN set FROM system.numbers LIMIT 10.
Bug Fixes:
- Fixed the
Illegal PREWHEREerror when reading from Merge tables forDistributedtables. - Added fixes that allow you to start clickhouse-server in IPv4-only Docker containers.
- Fixed a race condition when reading from system
system.parts_columns tables. - 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 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.
ClickHouse Release 1.1.54362, 2018-03-11
New Features:
- 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 BYclauses. 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. - Data can be partially reloaded from external dictionaries during updating (load just the records in which the value of the specified field greater than in the previous download) (Arsen Hakobyan).
- 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. - The
remoteandclustertable functions can be used inINSERTqueries. - 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
DROP TEMPORARY TABLEandEXISTS TEMPORARY TABLEqueries (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
throwIffunction. - 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). - The
system.processestable andSHOW PROCESSLISTnow have theis_cancelledandpeak_memory_usagecolumns.
Improvements:
- 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.
Bug Fixes:
- 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 segfault for certain uses of
replace_running_queryandKILL QUERY. - 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. - Fixed an error during initialization of the
part_logsystem table when the server starts (by default,part_logis disabled).
Backward Incompatible Changes:
- Removed the
distributed_ddl_allow_replicated_alteroption. This behavior is enabled by default. - Removed the
strict_insert_defaultssetting. If you were using this functionality, write tofeedback@clickhouse.com. - Removed the
UnsortedMergeTreeengine.
ClickHouse Release 1.1.54343, 2018-02-05
- 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 queries like
SELECT ... FROM table WHERE expr IN (subquery)are processed using thetableindex. - Improved processing of duplicates when inserting to Replicated tables, so they no longer slow down execution of the replication queue.
ClickHouse Release 1.1.54342, 2018-01-22
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 uses init.d.
- Fixed a regression in 1.1.54337: wrong default configuration in the Docker image.
- Fixed nondeterministic behavior of GraphiteMergeTree (you can see it in log messages
Data after merge is not byte-identical to the data on another replicas). - Fixed a bug that may lead to inconsistent merges after OPTIMIZE query to Replicated tables (you may see it in log messages
Part ... intersects the 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.
ClickHouse Release 1.1.54337, 2018-01-18
New Features:
- Added support for storage of multi-dimensional arrays and tuples (
Tupledata type) in tables. - Support for table functions for
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 TABLEin addition toINSERT INTO. - Improved support for time zones. The
DateTimedata type can be annotated with the timezone that is used for parsing and formatting in text formats. Example:DateTime('Asia/Istanbul'). When timezones are specified in functions forDateTimearguments, 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. Thenowfunction name is case-sensitive. - 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 function and correspondingMySQLandODBCtable engines for accessing remote databases. This functionality 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). Example:groupArray,groupUniqArray,topK. - Added the
max_client_network_bandwidthforclickhouse-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
intExp3andintExp4functions. - Added the
sumKahanaggregate function. - Added the to * Number* OrNull functions, where * Number* is a numeric type.
- Added support for
WITHclauses for anINSERT SELECTquery (author: zhang2014). - Added settings:
http_connection_timeout,http_send_timeout,http_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
ALTERfor tables of typeNull(Anastasiya Tsarkova). - 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).
Performance Optimizations:
- Improved performance of aggregate functions
min,max,any,anyLast,anyHeavy,argMin,argMaxfrom string arguments. - Improved performance of the functions
isInfinite,isFinite,isNaN,roundToExp2. - Improved performance of parsing and formatting
DateandDateTimetype values in text format. - 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 aggregate functions
varSamp,varPop,stddevSamp,stddevPop,covarSamp,covarPop,corrby reducing computational stability. The old functions are available under the namesvarSampStable,varPopStable,stddevSampStable,stddevPopStable,covarSampStable,covarPopStable,corrStable.
Bug Fixes:
- Fixed data deduplication after running a
DROPorDETACH 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. - Redesigned support for
Nullabletypes. Fixed bugs that may lead to a server crash. Fixed almost all other bugs related toNULLsupport: incorrect type conversions in INSERT SELECT, insufficient support for Nullable in HAVING and PREWHERE,join_use_nullsmode, Nullable types as arguments ofORoperator, etc. - Fixed various bugs related to internal semantics of data types. Examples: unnecessary summing of
Enumtype fields inSummingMergeTree; alignment ofEnumtypes inPrettyformats, etc. - Stricter checks for allowed combinations of composite columns.
- 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 a bug in
--pagerforclickhouse-client(author: 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 a bug in
Dictionarytables forrange_hasheddictionaries. - 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).
Build Improvements:
- The
pbuildertool is used for builds. 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
Restricted 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 withclangthe default islibc++instead oflibstdc++. - Extracted
clickhouse_parsersandclickhouse_common_iolibraries to speed up builds of various tools.
Backward Incompatible Changes:
- 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 does not haveNullablecolumns or if the type of your table is notLog, then you do not need to do anything. - Removed the
experimental_allow_extended_storage_definition_syntaxsetting. Now this feature is enabled by default. - The
runningIncomefunction was renamed torunningDifferenceStartingWithFirstvalueto avoid confusion. - 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 state format for aggregate functions
varSamp,varPop,stddevSamp,stddevPop,covarSamp,covarPop,corr. If you have stored states of these aggregate functions in tables (using theAggregateFunctiondata type or materialized views with corresponding states), please write to feedback@clickhouse.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. This ability will be returned in the next release.
Please Note When Upgrading:
- 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 different versions of ClickHouse are running on the cluster servers, it is possible that distributed queries using the following functions will have incorrect results:
varSamp,varPop,stddevSamp,stddevPop,covarSamp,covarPop,corr. You should update all cluster nodes.