Bug Fix

  • Fixed potential buffer overflow in decompress. Malicious user can pass fabricated compressed data that could cause read after buffer. This issue was found by Eldar Zaitov from Yandex information security team. #8404 ()
  • Fixed possible server crash () when the server cannot send or write data in JSON or XML format with values of String data type (that require UTF-8 validation) or when compressing result data with Brotli algorithm or in some other rare cases. #8384 ()
  • Fixed dictionaries with source from a clickhouse VIEW, now reading such dictionaries does not cause the error There is no query. #8351 ()
  • Fixed checking if a client host is allowed by host_regexp specified in users.xml. #8241, (Vitaly Baranov)
  • RENAME TABLE for a distributed table now renames the folder containing inserted data before sending to shards. This fixes an issue with successive renames tableA->tableB, tableC->tableA. (tavplubix)
  • range_hashed external dictionaries created by DDL queries now allow ranges of arbitrary numeric types. (alesapin)
  • Fixed INSERT INTO table SELECT ... FROM mysql(...) table function. (tavplubix)
  • Fixed segfault in INSERT INTO TABLE FUNCTION file() while inserting into a file which does not exist. Now in this case file would be created and then insert would be processed. (Olga Khvostikova)
  • Fixed bitmapAnd error when intersecting an aggregated bitmap and a scalar bitmap. (Yue Huang)
  • Fixed segfault when EXISTS query was used without TABLE or DICTIONARY qualifier, just like EXISTS t. (alexey-milovidov)
  • Fixed return type for functions rand and randConstant in case of nullable argument. Now functions always return UInt32 and never Nullable(UInt32). (Nikolai Kochetov)
  • Fixed DROP DICTIONARY IF EXISTS db.dict, now it does not throw exception if db does not exist. (Vitaly Baranov)
  • If a table wasn’t completely dropped because of server crash, the server will try to restore and load it (tavplubix)
  • Fixed a trivial count query for a distributed table if there are more than two shard local table. (小路)
  • Fixed bug that lead to a data race in DB::BlockStreamProfileInfo::calculateRowsBeforeLimit() (Alexander Kazakov)
  • Fixed ALTER table MOVE part executed immediately after merging the specified part, which could cause moving a part which the specified part merged into. Now it correctly moves the specified part. (Vladimir Chebotarev)
  • Expressions for dictionaries can be specified as strings now. This is useful for calculation of attributes while extracting data from non-ClickHouse sources because it allows to use non-ClickHouse syntax for those expressions. (alesapin)
  • Fixed a very rare race in clickhouse-copier because of an overflow in ZXid. (Ding Xiang Fei)
  • Fixed the bug when after the query failed (due to “Too many simultaneous queries” for example) it would not read external tables info, and the
    next request would interpret this info as the beginning of the next query causing an error like Unknown packet from client. (Azat Khuzhin)
  • Avoid null dereference after “Unknown packet X from server” (Azat Khuzhin)
  • Restore support of all ICU locales, add the ability to apply collations for constant expressions and add language name to system.collations table. (alesapin)
  • Number of streams for read from StorageFile and StorageHDFS is now limited, to avoid exceeding the memory limit. (alesapin)
  • Fixed CHECK TABLE query for *MergeTree tables without key. (alesapin)
  • Removed the mutation number from a part name in case there were no mutations. This removing improved the compatibility with older versions. (alesapin)
  • Fixed the bug that mutations are skipped for some attached parts due to their data_version are larger than the table mutation version. (Zhichang Yu)
  • Allow starting the server with redundant copies of parts after moving them to another device. (Vladimir Chebotarev)
  • Fixed the error “Sizes of columns does not match” that might appear when using aggregate function columns. (Boris Granveaud)
  • Now an exception will be thrown in case of using WITH TIES alongside LIMIT BY. And now it’s possible to use TOP with LIMIT BY. (Nikita Mikhaylov)
  • Fix dictionary reload if it has invalidate_query, which stopped updates and some exception on previous update tries. (alesapin)

ClickHouse Release 19.17.4.11, 2019-11-22

Backward Incompatible Change

  • Using column instead of AST to store scalar subquery results for better performance. Setting enable_scalar_subquery_optimization was added in 19.17 and it was enabled by default. It leads to errors like during upgrade to 19.17.2 or 19.17.3 from previous versions. This setting was disabled by default in 19.17.4, to make possible upgrading from 19.16 and older versions without errors. #7392 ()

New Feature

  • Add the ability to create dictionaries with DDL queries. (alesapin)
  • Make bloom_filter type of index supporting LowCardinality and Nullable #7561 ()
  • Add function isValidJSON to check that passed string is a valid json. #5910 (Vdimir)
  • Implement arrayCompact function (Memo)
  • Created function hex for Decimal numbers. It works like hex(reinterpretAsString()), but does not delete last zero bytes. (Mikhail Korotov)
  • Add arrayFill and arrayReverseFill functions, which replace elements by other elements in front/back of them in the array. (hcz)
  • Add CRC32IEEE()/CRC64() support (Azat Khuzhin)
  • Implement char function similar to one in #7486 ()
  • Add bitmapTransform function. It transforms an array of values in a bitmap to another array of values, the result is a new bitmap #7598 ()
  • Implemented javaHashUTF16LE() function #7651 ()
  • Add _shard_num virtual column for the Distributed engine #7624 ()

Experimental Feature

  • Support for processors (new query execution pipeline) in MergeTree. (Nikolai Kochetov)

Bug Fix

  • Fix incorrect float parsing in Values #7817 (tavplubix)
  • Fix rare deadlock which can happen when trace_log is enabled. (filimonov)
  • Prevent message duplication when producing Kafka table has any MVs selecting from it (Ivan)
  • Support for Array(LowCardinality(Nullable(String))) in IN. Resolves #7366 ()
  • Add handling of SQL_TINYINT and SQL_BIGINT, and fix handling of SQL_FLOAT data source types in ODBC Bridge. #7491 ()
  • Fix aggregation (avg and quantiles) over empty decimal columns #7431 ()
  • Fix INSERT into Distributed with MATERIALIZED columns #7377 ()
  • Make MOVE PARTITION work if some parts of partition are already on destination disk or volume #7434 ()
  • Fixed bug with hardlinks failing to be created during mutations in ReplicatedMergeTree in multi-disk configurations. #7558 ()
  • Fixed a bug with a mutation on a MergeTree when whole part remains unchanged and best space is being found on another disk #7602 ()
  • Fixed bug with keep_free_space_ratio not being read from disks configuration #7645 ()
  • Fix bug with table contains only Tuple columns or columns with complex paths. Fixes 7541. (alesapin)
  • Do not account memory for Buffer engine in max_memory_usage limit (Azat Khuzhin)
  • Fix final mark usage in MergeTree tables ordered by tuple(). In rare cases it could lead to Can't adjust last granule error while select. (Anton Popov)
  • Fix bug in mutations that have predicate with actions that require context (for example functions for json), which may lead to crashes or strange exceptions. (alesapin)
  • Fix mismatch of database and table names escaping in data/ and shadow/ directories (Alexander Burmak)
  • Support duplicated keys in RIGHT|FULL JOINs, e.g. ON t.x = u.x AND t.x = u.y. Fix crash in this case. (Artem Zuikov)
  • Fix Not found column <expression> in block when joining on expression with RIGHT or FULL JOIN. (Artem Zuikov)
  • One more attempt to fix infinite loop in PrettySpace format (Olga Khvostikova)
  • Fix bug in concat function when all arguments were FixedString of the same size. (alesapin)
  • Fixed exception in case of using 1 argument while defining S3, URL and HDFS storages. (Vladimir Chebotarev)
  • Fix scope of the InterpreterSelectQuery for views with query (Azat Khuzhin)

Improvement

  • Nullable columns recognized and NULL-values handled correctly by ODBC-bridge #7402 ()
  • Write current batch for distributed send atomically #7600 ()
  • Throw an exception if we cannot detect table for column name in query. #7358 ()
  • Add merge_max_block_size setting to MergeTreeSettings #7412 ()
  • Queries with HAVING and without GROUP BY assume group by constant. So, SELECT 1 HAVING 1 now returns a result. #7496 ()
  • Support parsing (X,) as tuple similar to python. #7501, (Amos Bird)
  • Make range function behaviors almost like pythonic one. (sundyli)
  • Add constraints columns to table system.settings (Vitaly Baranov)
  • Better Null format for tcp handler, so that it’s possible to use select ignore(<expression>) from table format Null for perf measure via clickhouse-client (Amos Bird)
  • Queries like CREATE TABLE ... AS (SELECT (1, 2)) are parsed correctly (hcz)

Performance Improvement

  • The performance of aggregation over short string keys is improved. #6243 (, Amos Bird)
  • Run another pass of syntax/expression analysis to get potential optimizations after constant predicates are folded. (Amos Bird)
  • Use storage meta info to evaluate trivial SELECT count() FROM table; (Amos Bird, )
  • Vectorize processing arrayReduce similar to Aggregator addBatch. #7608 ()
  • Minor improvements in performance of Kafka consumption #7475 ()

Build/Testing/Packaging Improvement

  • Add support for cross-compiling to the CPU architecture AARCH64. Refactor packager script. #7539 ()
  • Unpack darwin-x86_64 and linux-aarch64 toolchains into mounted Docker volume when building packages #7534 ()
  • Update Docker Image for Binary Packager #7474 ()
  • Fixed compile errors on MacOS Catalina #7585 ()
  • Some refactoring in query analysis logic: split complex class into several simple ones. #7454 ()
  • Fix build without submodules #7295 ()
  • Better add_globs in CMake files #7418 ()
  • Remove hardcoded paths in unwind target #7460 ()
  • Allow to use mysql format without ssl #7524 ()

Other

  • Added ANTLR4 grammar for ClickHouse SQL dialect #7596 ()

ClickHouse Release 19.16

ClickHouse Release 19.16.14.65, 2020-03-25

  • Fixed up a bug in batched calculations of ternary logical OPs on multiple arguments (more than 10). #8718 () This bugfix was backported to version 19.16 by a special request from Altinity.

ClickHouse Release 19.16.14.65, 2020-03-05

  • Fix distributed subqueries incompatibility with older CH versions. Fixes
    (tabplubix)
  • When executing CREATE query, fold constant expressions in storage engine arguments. Replace empty database name with current database. Fixes , #3492. Also fix check for local address in ClickHouseDictionarySource.
    (tabplubix)
  • Now background merges in *MergeTree table engines family preserve storage policy volume order more accurately.
    (Vladimir Chebotarev)
  • Prevent losing data in Kafka in rare cases when exception happens after reading suffix but before commit. Fixes . Related: #7175
    (filimonov)
  • Fix bug leading to server termination when trying to use / drop Kafka table created with wrong parameters. Fixes . Incorporates #9507.
    (filimonov)
  • Allow using MaterializedView with subqueries above Kafka tables.
    (filimonov)

New Feature

  • Add deduplicate_blocks_in_dependent_materialized_views option to control the behaviour of idempotent inserts into tables with materialized views. This new feature was added to the bugfix release by a special request from Altinity.
    #9070

ClickHouse Release 19.16.2.2, 2019-10-30

Backward Incompatible Change

  • Add missing arity validation for count/counIf.
    #7095
    (Vdimir)
  • Remove legacy asterisk_left_columns_only setting (it was disabled by default).
    (Artem
    Zuikov
    )
  • Format strings for Template data format are now specified in files.

    (tavplubix)

New Feature

  • Introduce uniqCombined64() to calculate cardinality greater than UINT_MAX.
    #7213,
    (Azat
    Khuzhin
    )
  • Support Bloom filter indexes on Array columns.

    (achimbab)
  • Add a function getMacro(name) that returns String with the value of corresponding <macros>
    from server configuration.
    (alexey-milovidov)
  • Set two configuration options for a dictionary based on an HTTP source: credentials and
    http-headers. (Guillaume
    Tassery
    )
  • Add a new ProfileEvent Merge that counts the number of launched background merges.
    (Mikhail
    Korotov
    )
  • Add fullHostName function that returns a fully qualified domain name.

    #7291 ()
  • Add function arraySplit and arrayReverseSplit which split an array by “cut off”
    conditions. They are useful in time sequence handling.
    #7294 ()
  • Add new functions that return the Array of all matched indices in multiMatch family of functions.
    #7299 ()
  • Add a new database engine Lazy that is optimized for storing a large number of small -Log
    tables. #7171 ()
  • Add aggregate functions groupBitmapAnd, -Or, -Xor for bitmap columns. #7109 ()
  • Add aggregate function combinators -OrNull and -OrDefault, which return null
    or default values when there is nothing to aggregate.
    #7331
    ()
  • Introduce CustomSeparated data format that supports custom escaping and
    delimiter rules. #7118
    ()
  • Support Redis as source of external dictionary. #4361 (comunodi, )

Bug Fix

  • Fix wrong query result if it has WHERE IN (SELECT ...) section and optimize_read_in_order is
    used. (Anton
    Popov
    )
  • Disabled MariaDB authentication plugin, which depends on files outside of project.
    (Yuriy
    Baranov
    )
  • Fix exception Cannot convert column ... because it is constant but values of constants are different in source and result which could rarely happen when functions now(), today(),
    yesterday(), randConstant() are used.
    (Nikolai
    Kochetov
    )
  • Fixed issue of using HTTP keep alive timeout instead of TCP keep alive timeout.
    (Vasily
    Nemkov
    )
  • Fixed a segmentation fault in groupBitmapOr (issue ).
    #7289 ()
  • For materialized views the commit for Kafka is called after all data were written.
    #7175 ()
  • Fixed wrong duration_ms value in system.part_log table. It was ten times off.
    #7172 ()
  • A quick fix to resolve crash in LIVE VIEW table and re-enabling all LIVE VIEW tests.
    #7201
    ()
  • Serialize NULL values correctly in min/max indexes of MergeTree parts.
    #7234 ()
  • Don’t put virtual columns to .sql metadata when table is created as CREATE TABLE AS.
    #7183 ()
  • Fix segmentation fault in ATTACH PART query.
    #7185
    ()
  • Fix wrong result for some queries given by the optimization of empty IN subqueries and empty
    INNER/RIGHT JOIN. #7284 ()
  • Fixing AddressSanitizer error in the LIVE VIEW getHeader() method.
    #7271
    ()

Improvement

  • Add a message in case of queue_wait_max_ms wait takes place.
    (Azat
    Khuzhin
    )
  • Made setting s3_min_upload_part_size table-level.
    (Vladimir
    Chebotarev
    )
  • Check TTL in StorageFactory.
    (sundyli)
  • Squash left-hand blocks in partial merge join (optimization).
    (Artem
    Zuikov
    )
  • Do not allow non-deterministic functions in mutations of Replicated table engines, because this
    can introduce inconsistencies between replicas.
    (Alexander
    Kazakov
    )
  • Disable memory tracker while converting exception stack trace to string. It can prevent the loss
    of error messages of type Memory limit exceeded on server, which caused the Attempt to read after eof exception on client.
    (Nikolai Kochetov)
  • Miscellaneous format improvements. Resolves
    ,
    #2633,
    ,
    #6742

    (tavplubix)
  • ClickHouse ignores values on the right side of IN operator that are not convertible to the left
    side type. Make it work properly for compound types – Array and Tuple.
    (Alexander
    Kuzmenkov
    )
  • Support missing inequalities for ASOF JOIN. It’s possible to join less-or-equal variant and strict
    greater and less variants for ASOF column in ON syntax.
    (Artem
    Zuikov
    )
  • Optimize partial merge join.
    (Artem Zuikov)
  • Do not use more than 98K of memory in uniqCombined functions.
    ,
    #7270 ()
  • Flush parts of right-hand joining table on disk in PartialMergeJoin (if there is not enough
    memory). Load data back when needed. #7186
    ()

Performance Improvement

  • Speed up joinGet with const arguments by avoiding data duplication.
    (Amos
    Bird
    )
  • Return early if the subquery is empty.
    (小路)
  • Optimize parsing of SQL expression in Values.

    (tavplubix)

Build/Testing/Packaging Improvement

  • Disable some contribs for cross-compilation to Mac OS.
    #7101 ()
  • Add missing linking with PocoXML for clickhouse_common_io.
    #7200 ()
  • Accept multiple test filter arguments in clickhouse-test.
    #7226 ()
  • Enable musl and jemalloc for ARM. #7300
    ()
  • Added --client-option parameter to clickhouse-test to pass additional parameters to client.
    #7277 ()
  • Preserve existing configs on rpm package upgrade.
    #7103
    ()
  • Fix errors detected by PVS. #7153 ()
  • Fix build for Darwin. #7149
    ()
  • glibc 2.29 compatibility. #7142 ()
  • Make sure dh_clean does not touch potential source files.
    #7205 ()
  • Attempt to avoid conflict when updating from altinity rpm - it has config file packaged separately
    in clickhouse-server-common. #7073
    ()
  • Optimize some header files for faster rebuilds.
    #7212,
    (Alexander
    Kuzmenkov
    )
  • Add performance tests for Date and DateTime. (Vasily
    Nemkov
    )
  • Fix some tests that contained non-deterministic mutations.
    (Alexander
    Kazakov
    )
  • Add build with MemorySanitizer to CI.
    (Alexander Kuzmenkov)
  • Avoid use of uninitialized values in MetricsTransmitter.
    (Azat
    Khuzhin
    )
  • Fix some issues in Fields found by MemorySanitizer.
    ,
    #7179 (), #7376
    ()
  • Fix undefined behavior in murmurhash32. #7388 ()
  • Fix undefined behavior in StoragesInfoStream. #7384
    ()
  • Fixed constant expressions folding for external database engines (MySQL, ODBC, JDBC). In previous
    versions it wasn’t working for multiple constant expressions and was not working at all for Date,
    DateTime and UUID. This fixes #7245

    (alexey-milovidov)
  • Fixing ThreadSanitizer data race error in the LIVE VIEW when accessing no_users_thread variable.

    (vzakaznikov)
  • Get rid of malloc symbols in libcommon
    ,
    #7065 ()
  • Add global flag ENABLE_LIBRARIES for disabling all libraries.
    #7063
    ()

Code Cleanup

  • Generalize configuration repository to prepare for DDL for Dictionaries.
    (alesapin)
  • Parser for dictionaries DDL without any semantic.

    (alesapin)
  • Split ParserCreateQuery into different smaller parsers.

    (alesapin)
  • Small refactoring and renaming near external dictionaries.

    (alesapin)
  • Refactor some code to prepare for role-based access control. (Vitaly
    Baranov
    )
  • Some improvements in DatabaseOrdinary code.
    (Nikita
    Vasilev
    )
  • Do not use iterators in find() and emplace() methods of hash tables.
    (Alexander
    Kuzmenkov
    )
  • Fix getMultipleValuesFromConfig in case when parameter root is not empty.
    (Mikhail Korotov)
  • Remove some copy-paste (TemporaryFile and TemporaryFileStream)
    (Artem
    Zuikov
    )
  • Improved code readability a little bit (MergeTreeData::getActiveContainingPart).
    (Vladimir
    Chebotarev
    )
  • Wait for all scheduled jobs, which are using local objects, if ThreadPool::schedule(...) throws
    an exception. Rename ThreadPool::schedule(...) to ThreadPool::scheduleOrThrowOnError(...) and
    fix comments to make obvious that it may throw.

    (tavplubix)

ClickHouse Release 19.15

ClickHouse Release 19.15.4.10, 2019-10-31

Bug Fix

  • Added handling of SQL_TINYINT and SQL_BIGINT, and fix handling of SQL_FLOAT data source types in ODBC Bridge.
    #7491 ()
  • Allowed to have some parts on destination disk or volume in MOVE PARTITION.
    #7434 ()
  • Fixed NULL-values in nullable columns through ODBC-bridge.
    #7402 ()
  • Fixed INSERT into Distributed non local node with MATERIALIZED columns.
    #7377 ()
  • Fixed function getMultipleValuesFromConfig.
    #7374 ()
  • Fixed issue of using HTTP keep alive timeout instead of TCP keep alive timeout.
    #7351 ()
  • Wait for all jobs to finish on exception (fixes rare segfaults).
    #7350 ()
  • Don’t push to MVs when inserting into Kafka table.
    #7265 ()
  • Disable memory tracker for exception stack.
    #7264 ()
  • Fixed bad code in transforming query for external database.
    #7252 ()
  • Avoid use of uninitialized values in MetricsTransmitter.
    #7158 ()
  • Added example config with macros for tests (alexey-milovidov)

ClickHouse Release 19.15.3.6, 2019-10-09

Bug Fix

  • Fixed bad_variant in hashed dictionary.
    ()
  • Fixed up bug with segmentation fault in ATTACH PART query.
    (alesapin)
  • Fixed time calculation in MergeTreeData.
    ()
  • Commit to Kafka explicitly after the writing is finalized.
    #7175 ()
  • Serialize NULL values correctly in min/max indexes of MergeTree parts.
    #7234 ()

ClickHouse Release 19.15.2.2, 2019-10-01

New Feature

  • Tiered storage: support to use multiple storage volumes for tables with MergeTree engine. It’s possible to store fresh data on SSD and automatically move old data to HDD. (example). (Igr) (alesapin)
  • Add table function input for reading incoming data in INSERT SELECT query. (palasonic1) (Anton Popov)
  • Add a sparse_hashed dictionary layout, that is functionally equivalent to the hashed layout, but is more memory efficient. It uses about twice as less memory at the cost of slower value retrieval. (Azat Khuzhin)
  • Implement ability to define list of users for access to dictionaries. Only current connected database using. (Guillaume Tassery)
  • Add LIMIT option to SHOW query. (Philipp Malkovsky)
  • Add bitmapSubsetLimit(bitmap, range_start, limit) function, that returns subset of the smallest limit values in set that is no smaller than range_start. (Zhichang Yu)
  • Add bitmapMin and bitmapMax functions. (Zhichang Yu)
  • Add function repeat related to #6999 ()

Experimental Feature

  • Implement (in memory) Merge Join variant that does not change current pipeline. Result is partially sorted by merge key. Set partial_merge_join = 1 to use this feature. The Merge Join is still in development. (Artem Zuikov)
  • Add S3 engine and table function. It is still in development (no authentication support yet). (Vladimir Chebotarev)

Improvement

  • Every message read from Kafka is inserted atomically. This resolves almost all known issues with Kafka engine. #6950 ()
  • Improvements for failover of Distributed queries. Shorten recovery time, also it is now configurable and can be seen in system.clusters. #6399 ()
  • Support numeric values for Enums directly in IN section. #6766 #6941 ()
  • Support (optional, disabled by default) redirects on URL storage. #6914 ()
  • Add information message when client with an older version connects to a server. #6893 ()
  • Remove maximum backoff sleep time limit for sending data in Distributed tables #6895 ()
  • Add ability to send profile events (counters) with cumulative values to graphite. It can be enabled under <events_cumulative> in server config.xml. #6969 ()
  • Add automatically cast type T to LowCardinality(T) while inserting data in column of type LowCardinality(T) in Native format via HTTP. #6891 ()
  • Add ability to use function hex without using reinterpretAsString for Float32, Float64. #7024 ()

Build/Testing/Packaging Improvement

  • Add gdb-index to clickhouse binary with debug info. It will speed up startup time of gdb. (alesapin)
  • Speed up deb packaging with patched dpkg-deb which uses pigz. (alesapin)
  • Set enable_fuzzing = 1 to enable libfuzzer instrumentation of all the project code. (kyprizel)
  • Add split build smoke test in CI. (alesapin)
  • Add build with MemorySanitizer to CI. (Alexander Kuzmenkov)
  • Replace libsparsehash with sparsehash-c11 (Azat Khuzhin)

Bug Fix

  • Fixed performance degradation of index analysis on complex keys on large tables. This fixes #6924. #7075 ()
  • Fix logical error causing segfaults when selecting from Kafka empty topic. #6909 ()
  • Fix too early MySQL connection close in MySQLBlockInputStream.cpp. #6882 ()
  • Returned support for very old Linux kernels (fix #6841) (alexey-milovidov)
  • Fix possible data loss in insert select query in case of empty block in input stream. #6834 #6862 (Nikolai Kochetov)
  • Fix for function АrrayEnumerateUniqRanked with empty arrays in params (proller)
  • Fix complex queries with array joins and global subqueries. (Ivan)
  • Fix Unknown identifier error in ORDER BY and GROUP BY with multiple JOINs (Artem Zuikov)
  • Fixed MSan warning while executing function with LowCardinality argument. (Nikolai Kochetov)

Backward Incompatible Change

  • Changed serialization format of bitmap* aggregate function states to improve performance. Serialized states of bitmap* from previous versions cannot be read. #6908 ()

ClickHouse Release 19.14

ClickHouse Release 19.14.7.15, 2019-10-02

Bug Fix

  • This release also contains all bug fixes from 19.11.12.69.
  • Fixed compatibility for distributed queries between 19.14 and earlier versions. This fixes . #7069 ()

ClickHouse Release 19.14.6.12, 2019-09-19

Bug Fix

  • Fix for function АrrayEnumerateUniqRanked with empty arrays in params. #6928 ()
  • Fixed subquery name in queries with ARRAY JOIN and GLOBAL IN subquery with alias. Use subquery alias for external table name if it is specified. #6934 ()

Build/Testing/Packaging Improvement

  • Fix .html) test 00715_fetch_merged_or_mutated_part_zookeeper by rewriting it to a shell scripts because it needs to wait for mutations to apply. #6977 ()
  • Fixed UBSan and MemSan failure in function groupUniqArray with emtpy array argument. It was caused by placing of empty PaddedPODArray into hash table zero cell because constructor for zero cell value was not called. #6937 ()

ClickHouse Release 19.14.3.3, 2019-09-10

New Feature

  • WITH FILL modifier for ORDER BY. (continuation of #5069) (Anton Popov)
  • WITH TIES modifier for LIMIT. (continuation of ) #6610 ()
  • Parse unquoted NULL literal as NULL (if setting format_csv_unquoted_null_literal_as_null=1). Initialize null fields with default values if data type of this field is not nullable (if setting input_format_null_as_default=1). #5990 (tavplubix)
  • Support for wildcards in paths of table functions file and hdfs. If the path contains wildcards, the table will be readonly. Example of usage: select * from hdfs('hdfs://hdfs1:9000/some_dir/another_dir/*/file{0..9}{0..9}') and select * from file('some_dir/{some_file,another_file,yet_another}.tsv', 'TSV', 'value UInt32'). (Olga Khvostikova)
  • New system.metric_log table which stores values of system.events and system.metrics with specified time interval. #6467 () #6530 ()
  • Allow to write ClickHouse text logs to system.text_log table. #6037 (Nikita Mikhaylov) (alexey-milovidov)
  • Show private symbols in stack traces (this is done via parsing symbol tables of ELF files). Added information about file and line number in stack traces if debug info is present. Speedup symbol name lookup with indexing symbols present in program. Added new SQL functions for introspection: demangle and addressToLine. Renamed function symbolizeAddress to addressToSymbol for consistency. Function addressToSymbol will return mangled name for performance reasons and you have to apply demangle. Added setting allow_introspection_functions which is turned off by default. (alexey-milovidov)
  • Table function values (the name is case-insensitive). It allows to read from VALUES list proposed in . Example: SELECT * FROM VALUES('a UInt64, s String', (1, 'one'), (2, 'two'), (3, 'three')). #6217. (dimarub2000)
  • Added an ability to alter storage settings. Syntax: ALTER TABLE <table> MODIFY SETTING <setting> = <value>. #6669 (alesapin)
  • Support for removing of detached parts. Syntax: ALTER TABLE <table_name> DROP DETACHED PART '<part_id>'. (tavplubix)
  • Table constraints. Allows to add constraint to table definition which will be checked at insert. (Gleb Novikov) (alexey-milovidov)
  • Suppport for cascaded materialized views. (Amos Bird)
  • Turn on query profiler by default to sample every query execution thread once a second. (alexey-milovidov)
  • Input format ORC. #6703 ()
  • Added two new functions: sigmoid and tanh (that are useful for machine learning applications). #6254 ()
  • Function hasToken(haystack, token), hasTokenCaseInsensitive(haystack, token) to check if given token is in haystack. Token is a maximal length substring between two non alphanumeric ASCII characters (or boundaries of haystack). Token must be a constant string. Supported by tokenbf_v1 index specialization. #6596, (Vasily Nemkov)
  • New function neighbor(value, offset[, default_value]). Allows to reach prev/next value within column in a block of data. (Alex Krash) 341e2e4587a18065c2da1ca888c73389f48ce36c
  • Created a function currentUser(), returning login of authorized user. Added alias user() for compatibility with MySQL. #6470 ()
  • New aggregate functions quantilesExactInclusive and quantilesExactExclusive which were proposed in #5885. (dimarub2000)
  • Function bitmapRange(bitmap, range_begin, range_end) which returns new set with specified range (not include the range_end). (Zhichang Yu)
  • Function geohashesInBox(longitude_min, latitude_min, longitude_max, latitude_max, precision) which creates array of precision-long strings of geohash-boxes covering provided area. (Vasily Nemkov)
  • Implement support for INSERT query with Kafka tables. (Ivan)
  • Added support for _partition and _timestamp virtual columns to Kafka engine. (Ivan)
  • Possibility to remove sensitive data from query_log, server logs, process list with regexp-based rules. (filimonov)

Experimental Feature

  • Input and output data format Template. It allows to specify custom format string for input and output. #4354 (tavplubix)
  • Implementation of LIVE VIEW tables that were originally proposed in , prepared in #3925, and then updated in . See #5541 for detailed description. (vzakaznikov) (Nikolai Kochetov) (vzakaznikov) Note that LIVE VIEW feature may be removed in next versions.

Bug Fix

  • This release also contains all bug fixes from 19.13 and 19.11.
  • Fix segmentation fault when the table has skip indices and vertical merge happens. #6723 ()
  • Fix per-column TTL with non-trivial column defaults. Previously in case of force TTL merge with OPTIMIZE ... FINAL query, expired values was replaced by type defaults instead of user-specified column defaults. #6796 ()
  • Fix Kafka messages duplication problem on normal server restart. #6597 ()
  • Fixed infinite loop when reading Kafka messages. Do not pause/resume consumer on subscription at all - otherwise it may get paused indefinitely in some scenarios. #6354 ()
  • Fix Key expression contains comparison between inconvertible types exception in bitmapContains function. #6136 #6156 ()
  • Fix segfault with enabled optimize_skip_unused_shards and missing sharding key. #6384 ()
  • Fixed wrong code in mutations that may lead to memory corruption. Fixed segfault with read of address 0x14c0 that may happed due to concurrent DROP TABLE and SELECT from system.parts or system.parts_columns. Fixed race condition in preparation of mutation queries. Fixed deadlock caused by OPTIMIZE of Replicated tables and concurrent modification operations like ALTERs. #6514 ()
  • Removed extra verbose logging in MySQL interface #6389 ()
  • Return the ability to parse boolean settings from ‘true’ and ‘false’ in the configuration file. #6278 ()
  • Fix crash in quantile and median function over Nullable(Decimal128). #6378 ()
  • Fixed possible incomplete result returned by SELECT query with WHERE condition on primary key contained conversion to Float type. It was caused by incorrect checking of monotonicity in toFloat function. #6248 (dimarub2000)
  • Check max_expanded_ast_elements setting for mutations. Clear mutations after TRUNCATE TABLE. (Winter Zhang)
  • Fix JOIN results for key columns when used with join_use_nulls. Attach Nulls instead of columns defaults. (Artem Zuikov)
  • Fix rare crash in ALTER MODIFY COLUMN and vertical merge when one of merged/altered parts is empty (0 rows) #6780 ()
  • Fixed bug in conversion of LowCardinality types in AggregateFunctionFactory. This fixes #6257. (Nikolai Kochetov)
  • Fix wrong behavior and possible segfaults in topK and topKWeighted aggregated functions. (Anton Popov)
  • Fixed unsafe code around getIdentifier function. #6409 ()
  • Fixed bug in MySQL wire protocol (is used while connecting to ClickHouse form MySQL client). Caused by heap buffer overflow in PacketPayloadWriteBuffer. #6212 ()
  • Fixed memory leak in bitmapSubsetInRange function. #6819 ()
  • Fix rare bug when mutation executed after granularity change. #6816 ()
  • Allow protobuf message with all fields by default. #6132 ()
  • Resolve a bug with nullIf function when we send a NULL argument on the second argument. #6446 ()
  • Fix rare bug with wrong memory allocation/deallocation in complex key cache dictionaries with string fields which leads to infinite memory consumption (looks like memory leak). Bug reproduces when string size was a power of two starting from eight (8, 16, 32, etc). #6447 ()
  • Fixed Gorilla encoding on small sequences which caused exception Cannot write after end of buffer. #6398 (Vasily Nemkov)
  • Allow to use not nullable types in JOINs with join_use_nulls enabled. (Artem Zuikov)
  • Disable Poco::AbstractConfiguration substitutions in query in clickhouse-client. (alexey-milovidov)
  • Avoid deadlock in REPLACE PARTITION. (alexey-milovidov)
  • Using arrayReduce for constant arguments may lead to segfault. #6326 ()
  • Fix inconsistent parts which can appear if replica was restored after DROP PARTITION. #6522 (tavplubix)
  • Fixed hang in JSONExtractRaw function. #6198 ()
  • Fix bug with incorrect skip indices serialization and aggregation with adaptive granularity. #6594. (alesapin)
  • Fix WITH ROLLUP and WITH CUBE modifiers of GROUP BY with two-level aggregation. (Anton Popov)
  • Fix bug with writing secondary indices marks with adaptive granularity. (alesapin)
  • Fix initialization order while server startup. Since StorageMergeTree::background_task_handle is initialized in startup() the MergeTreeBlockOutputStream::write() may try to use it before initialization. Just check if it is initialized. (Ivan)
  • Clearing the data buffer from the previous read operation that was completed with an error. (Nikolay)
  • Fix bug with enabling adaptive granularity when creating a new replica for Replicated*MergeTree table. #6452 ()
  • Fixed possible crash during server startup in case of exception happened in libunwind during exception at access to uninitialized ThreadStatus structure. #6456 ()
  • Fix crash in yandexConsistentHash function. Found by fuzz test. #6304 (alexey-milovidov)
  • Fixed the possibility of hanging queries when server is overloaded and global thread pool becomes near full. This have higher chance to happen on clusters with large number of shards (hundreds), because distributed queries allocate a thread per connection to each shard. For example, this issue may reproduce if a cluster of 330 shards is processing 30 concurrent distributed queries. This issue affects all versions starting from 19.2. (alexey-milovidov)
  • Fixed logic of arrayEnumerateUniqRanked function. (alexey-milovidov)
  • Fix segfault when decoding symbol table. (Amos Bird)
  • Fixed irrelevant exception in cast of LowCardinality(Nullable) to not-Nullable column in case if it does not contain Nulls (e.g. in query like SELECT CAST(CAST('Hello' AS LowCardinality(Nullable(String))) AS String). #6119 ()
  • Removed extra quoting of description in system.settings table. #6696 (alexey-milovidov)
  • Avoid possible deadlock in TRUNCATE of Replicated table. (alexey-milovidov)
  • Fix reading in order of sorting key. (Anton Popov)
  • Fix ALTER TABLE ... UPDATE query for tables with enable_mixed_granularity_parts=1. (alesapin)
  • Fix bug opened by (since 19.4.0). Reproduces in queries to Distributed tables over MergeTree tables when we does not query any columns (SELECT 1). #6236 ()
  • Fixed overflow in integer division of signed type to unsigned type. The behaviour was exactly as in C or C++ language (integer promotion rules) that may be surprising. Please note that the overflow is still possible when dividing large signed number to large unsigned number or vice-versa (but that case is less usual). The issue existed in all server versions. #6214 (alexey-milovidov)
  • Limit maximum sleep time for throttling when max_execution_speed or max_execution_speed_bytes is set. Fixed false errors like Estimated query execution time (inf seconds) is too long. #6232 ()
  • Fixed issues about using MATERIALIZED columns and aliases in MaterializedView. #448 #3450 #2285 (Amos Bird) (alexey-milovidov)
  • Fix FormatFactory behaviour for input streams which are not implemented as processor. (Nikolai Kochetov)
  • Fixed typo. (Alex Ryndin)
  • Typo in the error message ( is -> are ). (Denis Zhuravlev)
  • Fixed error while parsing of columns list from string if type contained a comma (this issue was relevant for File, URL, HDFS storages) . #6209 ()

Security Fix

  • This release also contains all bug security fixes from 19.13 and 19.11.
  • Fixed the possibility of a fabricated query to cause server crash due to stack overflow in SQL parser. Fixed the possibility of stack overflow in Merge and Distributed tables, materialized views and conditions for row-level security that involve subqueries. (alexey-milovidov)

Improvement

  • Correct implementation of ternary logic for AND/OR. #6048 ()
  • Now values and rows with expired TTL will be removed after OPTIMIZE ... FINAL query from old parts without TTL infos or with outdated TTL infos, e.g. after ALTER ... MODIFY TTL query. Added queries SYSTEM STOP/START TTL MERGES to disallow/allow assign merges with TTL and filter expired values in all merges. #6274 ()
  • Possibility to change the location of ClickHouse history file for client using CLICKHOUSE_HISTORY_FILE env. #6840 ()
  • Remove dry_run flag from InterpreterSelectQuery. … #6375 ()
  • Support ASOF JOIN with ON section. #6211 ()
  • Better support of skip indexes for mutations and replication. Support for MATERIALIZE/CLEAR INDEX ... IN PARTITION query. UPDATE x = x recalculates all indices that use column x. #5053 ()
  • Allow to ATTACH live views (for example, at the server startup) regardless to allow_experimental_live_view setting. #6754 ()
  • For stack traces gathered by query profiler, do not include stack frames generated by the query profiler itself. #6250 ()
  • Now table functions values, file, url, hdfs have support for ALIAS columns. #6255 ()
  • Throw an exception if config.d file does not have the corresponding root element as the config file. #6123 ()
  • Print extra info in exception message for no space left on device. #6182, #6352 ()
  • When determining shards of a Distributed table to be covered by a read query (for optimize_skip_unused_shards = 1) ClickHouse now checks conditions from both prewhere and where clauses of select statement. #6521 ()
  • Enabled SIMDJSON for machines without AVX2 but with SSE 4.2 and PCLMUL instruction set. #6285 (alexey-milovidov)
  • ClickHouse can work on filesystems without O_DIRECT support (such as ZFS and BtrFS) without additional tuning. #6730 ()
  • Support push down predicate for final subquery. #6120 () #6162 ()
  • Better JOIN ON keys extraction #6131 ()
  • Upated SIMDJSON. #6285. (alexey-milovidov)
  • Optimize selecting of smallest column for SELECT count() query. (Amos Bird)
  • Added strict parameter in windowFunnel(). When the strict is set, the windowFunnel() applies conditions only for the unique values. (achimbab)
  • Safer interface of mysqlxx::Pool. (avasiliev)
  • Options line size when executing with --help option now corresponds with terminal size. (dimarub2000)
  • Disable “read in order” optimization for aggregation without keys. (Anton Popov)
  • HTTP status code for INCORRECT_DATA and TYPE_MISMATCH error codes was changed from default 500 Internal Server Error to 400 Bad Request. (Alexander Rodin)
  • Move Join object from ExpressionAction into AnalyzedJoin. ExpressionAnalyzer and ExpressionAction do not know about Join class anymore. Its logic is hidden by AnalyzedJoin iface. (Artem Zuikov)
  • Fixed possible deadlock of distributed queries when one of shards is localhost but the query is sent via network connection. (alexey-milovidov)
  • Changed semantic of multiple tables RENAME to avoid possible deadlocks. . #6756 ()
  • Rewritten MySQL compatibility server to prevent loading full packet payload in memory. Decreased memory consumption for each connection to approximately 2 * DBMS_DEFAULT_BUFFER_SIZE (read/write buffers). #5811 ()
  • Move AST alias interpreting logic out of parser that does not have to know anything about query semantics. #6108 ()
  • Slightly more safe parsing of NamesAndTypesList. #6408. (alexey-milovidov)
  • clickhouse-copier: Allow use where_condition from config with partition_key alias in query for checking partition existence (Earlier it was used only in reading data queries). (proller)
  • Added optional message argument in throwIf. () #6329 ()
  • Server exception got while sending insertion data is now being processed in client as well. #5891 (dimarub2000)
  • Added a metric DistributedFilesToInsert that shows the total number of files in filesystem that are selected to send to remote servers by Distributed tables. The number is summed across all shards. (alexey-milovidov)
  • Move most of JOINs prepare logic from ExpressionAction/ExpressionAnalyzer to AnalyzedJoin. (Artem Zuikov)
  • Fix TSan .html) ‘lock-order-inversion’. #6740 ()
  • Better information messages about lack of Linux capabilities. Logging fatal errors with “fatal” level, that will make it easier to find in system.text_log. #6441 ()
  • When enable dumping temporary data to the disk to restrict memory usage during GROUP BY, ORDER BY, it didn’t check the free disk space. The fix add a new setting min_free_disk_space, when the free disk space it smaller then the threshold, the query will stop and throw ErrorCodes::NOT_ENOUGH_SPACE. #6678 () #6691 ()
  • Removed recursive rwlock by thread. It makes no sense, because threads are reused between queries. SELECT query may acquire a lock in one thread, hold a lock from another thread and exit from first thread. In the same time, first thread can be reused by DROP query. This will lead to false “Attempt to acquire exclusive lock recursively” messages. #6771 ()
  • Split ExpressionAnalyzer.appendJoin(). Prepare a place in ExpressionAnalyzer for MergeJoin. #6524 ()
  • Added mysql_native_password authentication plugin to MySQL compatibility server. #6194 ()
  • Less number of clock_gettime calls; fixed ABI compatibility between debug/release in Allocator (insignificant issue). #6197 ()
  • Move collectUsedColumns from ExpressionAnalyzer to SyntaxAnalyzer. SyntaxAnalyzer makes required_source_columns itself now. #6416 ()
  • Add setting joined_subquery_requires_alias to require aliases for subselects and table functions in FROM that more than one table is present (i.e. queries with JOINs). #6733 ()
  • Extract GetAggregatesVisitor class from ExpressionAnalyzer. #6458 ()
  • system.query_log: change data type of type column to Enum. #6265 ()
  • Static linking of sha256_password authentication plugin. #6512 ()
  • Avoid extra dependency for the setting compile to work. In previous versions, the user may get error like cannot open crti.o, unable to find library -lc etc. #6309 ()
  • More validation of the input that may come from malicious replica. #6303 ()
  • Now clickhouse-obfuscator file is available in clickhouse-client package. In previous versions it was available as clickhouse obfuscator (with whitespace). #5816 (dimarub2000)
  • Fixed deadlock when we have at least two queries that read at least two tables in different order and another query that performs DDL operation on one of tables. Fixed another very rare deadlock. (alexey-milovidov)
  • Added os_thread_ids column to system.processes and system.query_log for better debugging possibilities. (alexey-milovidov)
  • A workaround for PHP mysqlnd extension bugs which occur when sha256_password is used as a default authentication plugin (described in ). #6113 ()
  • Remove unneeded place with changed nullability columns. #6693 ()
  • Set default value of queue_max_wait_ms to zero, because current value (five seconds) makes no sense. There are rare circumstances when this settings has any use. Added settings replace_running_query_max_wait_ms, kafka_max_wait_ms and connection_pool_max_wait_ms for disambiguation. #6692 ()
  • Extract SelectQueryExpressionAnalyzer from ExpressionAnalyzer. Keep the last one for non-select queries. #6499 ()
  • Removed duplicating input and output formats. #6239 ()
  • Allow user to override poll_interval and idle_connection_timeout settings on connection. #6230 ()
  • MergeTree now has an additional option ttl_only_drop_parts (disabled by default) to avoid partial pruning of parts, so that they dropped completely when all the rows in a part are expired. #6191 ()
  • Type checks for set index functions. Throw exception if function got a wrong type. This fixes fuzz test with UBSan. #6511 ()

Performance Improvement

  • Optimize queries with ORDER BY expressions clause, where expressions have coinciding prefix with sorting key in MergeTree tables. This optimization is controlled by optimize_read_in_order setting. #6629 ()
  • Allow to use multiple threads during parts loading and removal. #6372 #6438 ()
  • Implemented batch variant of updating aggregate function states. It may lead to performance benefits. #6435 ()
  • Using FastOps library for functions exp, log, sigmoid, tanh. FastOps is a fast vector math library from Michael Parakhin (Yandex CTO). Improved performance of exp and log functions more than 6 times. The functions exp and log from Float32 argument will return Float32 (in previous versions they always return Float64). Now exp(nan) may return inf. The result of exp and log functions may be not the nearest machine representable number to the true answer. #6254 () Using Danila Kutenin variant to make fastops working #6317 ()
  • Disable consecutive key optimization for UInt8/16. #6298 (akuzm)
  • Improved performance of simdjson library by getting rid of dynamic allocation in ParsedJson::Iterator. (Vitaly Baranov)
  • Pre-fault pages when allocating memory with mmap(). (akuzm)
  • Fix performance bug in Decimal comparison. (Artem Zuikov)

Build/Testing/Packaging Improvement

  • Remove Compiler (runtime template instantiation) because we’ve win over it’s performance. #6646 ()
  • Added performance test to show degradation of performance in gcc-9 in more isolated way. #6302 ()
  • Added table function numbers_mt, which is multithreaded version of numbers. Updated performance tests with hash functions. #6554 ()
  • Comparison mode in clickhouse-benchmark #6220 (dimarub2000)
  • Best effort for printing stack traces. Also added SIGPROF as a debugging signal to print stack trace of a running thread. (alexey-milovidov)
  • Every function in its own file, part 10. (alexey-milovidov)
  • Remove doubled const TABLE_IS_READ_ONLY. (filimonov)
  • Formatting changes for StringHashMap PR . #6700 ()
  • Better subquery for join creation in ExpressionAnalyzer. #6824 ()
  • Remove a redundant condition (found by PVS Studio). #6775 ()
  • Separate the hash table interface for ReverseIndex. #6672 ()
  • Refactoring of settings. #6689 ()
  • Add comments for index functions. #6319 ()
  • Increase OOM score in debug version on Linux. #6152 ()
  • HDFS HA now work in debug build. #6650 ()
  • Added a test to transform_query_for_external_database. #6388 ()
  • Add test for multiple materialized views for Kafka table. #6509 ()
  • Make a better build scheme. #6500 ()
  • Fixed test_external_dictionaries integration in case it was executed under non root user. #6507 ()
  • The bug reproduces when total size of written packets exceeds DBMS_DEFAULT_BUFFER_SIZE. #6204 ()
  • Added a test for RENAME table race condition #6752 ()
  • Avoid data race on Settings in KILL QUERY. #6753 ()
  • Add integration test for handling errors by a cache dictionary. #6755 ()
  • Disable parsing of ELF object files on Mac OS, because it makes no sense. #6578 ()
  • Attempt to make changelog generator better. #6327 ()
  • Adding -Wshadow switch to the GCC. #6325 ()
  • Removed obsolete code for mimalloc support. #6715 ()
  • zlib-ng determines x86 capabilities and saves this info to global variables. This is done in defalteInit call, which may be made by different threads simultaneously. To avoid multithreaded writes, do it on library startup. #6141 ()
  • Regression test for a bug which in join which was fixed in #5192. (Bakhtiyor Ruziev)
  • Fixed MSan report. (alexey-milovidov)
  • Fix flapping TTL test. (Anton Popov)
  • Fixed false data race in MergeTreeDataPart::is_frozen field. (alexey-milovidov)
  • Fixed timeouts in fuzz test. In previous version, it managed to find false hangup in query SELECT * FROM numbers_mt(gccMurmurHash('')). (alexey-milovidov)
  • Added debug checks to static_cast of columns. (alexey-milovidov)
  • Support for Oracle Linux in official RPM packages. #6585 ()
  • Changed json perftests from once to loop type. #6536 ()
  • odbc-bridge.cpp defines main() so it should not be included in clickhouse-lib. #6538 ()
  • Test for crash in FULL|RIGHT JOIN with nulls in right table’s keys. #6362 ()
  • Added a test for the limit on expansion of aliases just in case. #6442 ()
  • Switched from boost::filesystem to std::filesystem where appropriate. #6253 (alexey-milovidov)
  • Added RPM packages to website. (alexey-milovidov)
  • Add a test for fixed Unknown identifier exception in IN section. (Artem Zuikov)
  • Simplify shared_ptr_helper because people facing difficulties understanding it. (alexey-milovidov)
  • Added performance tests for fixed Gorilla and DoubleDelta codec. (Vasily Nemkov)
  • Split the integration test test_dictionaries into 4 separate tests. (Vitaly Baranov)
  • Fix PVS-Studio warning in PipelineExecutor. (Nikolai Kochetov)
  • Allow to use library dictionary source with ASan. (alexey-milovidov)
  • Added option to generate changelog from a list of PRs. (alexey-milovidov)
  • Lock the TinyLog storage when reading. (akuzm)
  • Check for broken symlinks in CI. (alexey-milovidov)
  • Increase timeout for “stack overflow” test because it may take a long time in debug build. (alexey-milovidov)
  • Added a check for double whitespaces. (alexey-milovidov)
  • Fix new/delete memory tracking when build with sanitizers. Tracking is not clear. It only prevents memory limit exceptions in tests. (Artem Zuikov)
  • Enable back the check of undefined symbols while linking. (Ivan)
  • Avoid rebuilding hyperscan every day. (alexey-milovidov)
  • Fixed UBSan report in ProtobufWriter. (alexey-milovidov)
  • Don’t allow to use query profiler with sanitizers because it is not compatible. (alexey-milovidov)
  • Add test for reloading a dictionary after fail by timer. (Vitaly Baranov)
  • Fix inconsistency in PipelineExecutor::prepareProcessor argument type. (Nikolai Kochetov)
  • Added a test for bad URIs. (alexey-milovidov)
  • Added more checks to CAST function. This should get more information about segmentation fault in fuzzy test. (Nikolai Kochetov)
  • Added gcc-9 support to docker/builder container that builds image locally. (Gleb Novikov)
  • Test for primary key with LowCardinality(String). #6219 ()
  • Fixed tests affected by slow stack traces printing. #6315 ()
  • Add a test case for crash in groupUniqArray fixed in #6029. #6129 ()
  • Fixed indices mutations tests. #6645 ()
  • In performance test, do not read query log for queries we didn’t run. #6427 ()
  • Materialized view now could be created with any low cardinality types regardless to the setting about suspicious low cardinality types. #6428 ()
  • Updated tests for send_logs_level setting. #6207 ()
  • Fix build under gcc-8.2. #6196 ()
  • Fix build with internal libc++. #6724 ()
  • Fix shared build with rdkafka library #6101 ()
  • Fixes for Mac OS build (incomplete). #6390 () #6429 ()
  • Fix “splitted” build. #6618 ()
  • Other build fixes: #6186 () #6486 (vxider) (Ivan) #6421 (proller)

Backward Incompatible Change

  • Removed rarely used table function catBoostPool and storage CatBoostPool. If you have used this table function, please write email to [[email protected]](https://clickhouse.com/cdn-cgi/l/email-protection). Note that CatBoost integration remains and will be supported. #6279 ()
  • Disable ANY RIGHT JOIN and ANY FULL JOIN by default. Set any_join_distinct_right_table_keys setting to enable them. #5126 (Artem Zuikov)

ClickHouse Release 19.13

ClickHouse Release 19.13.6.51, 2019-10-02

Bug Fix

  • This release also contains all bug fixes from 19.11.12.69.

ClickHouse Release 19.13.5.44, 2019-09-20

Bug Fix

  • This release also contains all bug fixes from 19.14.6.12.
  • Fixed possible inconsistent state of table while executing DROP query for replicated table while zookeeper is not accessible. #6045 (Nikita Mikhaylov)
  • Fix for data race in StorageMerge (alexey-milovidov)
  • Fix bug introduced in query profiler which leads to endless recv from socket. (alesapin)
  • Fix excessive CPU usage while executing JSONExtractRaw function over a boolean value. (Vitaly Baranov)
  • Fixes the regression while pushing to materialized view. (Ivan)
  • Table function url had the vulnerability allowed the attacker to inject arbitrary HTTP headers in the request. This issue was found by . #6466 ()
  • Fix useless AST check in Set index. #6510 (Nikita Vasilev)
  • Fixed parsing of AggregateFunction values embedded in query. #6773 ()
  • Fixed wrong behaviour of trim functions family. #6647 ()

ClickHouse Release 19.13.4.32, 2019-09-10

Bug Fix

  • This release also contains all bug security fixes from 19.11.9.52 and 19.11.10.54.
  • Fixed data race in system.parts table and ALTER query. #6245 (alexey-milovidov)
  • Fixed mismatched header in streams happened in case of reading from empty distributed table with sample and prewhere. (Lixiang Qian) (Nikolai Kochetov)
  • Fixed crash when using IN clause with a subquery with a tuple. #6550 ()
  • Fix case with same column names in GLOBAL JOIN ON section. #6181 ()
  • Fix crash when casting types to Decimal that do not support it. Throw exception instead. #6297 ()
  • Fixed crash in extractAll() function. #6644 ()
  • Query transformation for MySQL, ODBC, JDBC table functions now works properly for SELECT WHERE queries with multiple AND expressions. #6381 (dimarub2000)
  • Added previous declaration checks for MySQL 8 integration. (Rafael David Tinoco)

Security Fix

  • Fix two vulnerabilities in codecs in decompression phase (malicious user can fabricate compressed data that will lead to buffer overflow in decompression). #6670 ()

ClickHouse Release 19.13.3.26, 2019-08-22

Bug Fix

  • Fix ALTER TABLE ... UPDATE query for tables with enable_mixed_granularity_parts=1. #6543 ()
  • Fix NPE when using IN clause with a subquery with a tuple. #6125 (tavplubix)
  • Fixed an issue that if a stale replica becomes alive, it may still have data parts that were removed by DROP PARTITION. #6523 ()
  • Fixed issue with parsing CSV #6426 (tavplubix)
  • Fixed data race in system.parts table and ALTER query. This fixes . #6513 ()
  • Fixed wrong code in mutations that may lead to memory corruption. Fixed segfault with read of address 0x14c0 that may happed due to concurrent DROP TABLE and SELECT from system.parts or system.parts_columns. Fixed race condition in preparation of mutation queries. Fixed deadlock caused by OPTIMIZE of Replicated tables and concurrent modification operations like ALTERs. #6514 ()
  • Fixed possible data loss after ALTER DELETE query on table with skipping index. #6224 (Nikita Vasilev)

Security Fix

  • If the attacker has write access to ZooKeeper and is able to run custom server available from the network where ClickHouse run, it can create custom-built malicious server that will act as ClickHouse replica and register it in ZooKeeper. When another replica will fetch data part from malicious replica, it can force clickhouse-server to write to arbitrary path on filesystem. Found by Eldar Zaitov, information security team at Yandex. #6247 ()

ClickHouse Release 19.13.2.19, 2019-08-14

New Feature

  • Sampling profiler on query level. Example. (laplab) (alexey-milovidov) #6283
  • Allow to specify a list of columns with COLUMNS('regexp') expression that works like a more sophisticated variant of * asterisk. #5951 (), (alexey-milovidov)
  • CREATE TABLE AS table_function() is now possible (dimarub2000)
  • Adam optimizer for stochastic gradient descent is used by default in stochasticLinearRegression() and stochasticLogisticRegression() aggregate functions, because it shows good quality without almost any tuning. (Quid37)
  • Added functions for working with the сustom week number (Andy Yang)
  • RENAME queries now work with all storages. (Ivan)
  • Now client receive logs from server with any desired level by setting send_logs_level regardless to the log level specified in server settings. (Nikita Mikhaylov)

Backward Incompatible Change

  • The setting input_format_defaults_for_omitted_fields is enabled by default. Inserts in Distributed tables need this setting to be the same on cluster (you need to set it before rolling update). It enables calculation of complex default expressions for omitted fields in JSONEachRow and CSV* formats. It should be the expected behavior but may lead to negligible performance difference. #6043 (), #5625 ()

Experimental Features

  • New query processing pipeline. Use experimental_use_processors=1 option to enable it. Use for your own trouble. (Nikolai Kochetov)

Bug Fix

  • Kafka integration has been fixed in this version.
  • Fixed DoubleDelta encoding of Int64 for large DoubleDelta values, improved DoubleDelta encoding for random data for Int32. #5998 ()
  • Fixed overestimation of max_rows_to_read if the setting merge_tree_uniform_read_distribution is set to 0. #6019 ()

Improvement

  • Throws an exception if config.d file does not have the corresponding root element as the config file (dimarub2000)

Performance Improvement

  • Optimize count(). Now it uses the smallest column (if possible). #6028 ()

Build/Testing/Packaging Improvement

  • Report memory usage in performance tests. (akuzm)
  • Fix build with external libcxx (Ivan)
  • Fix shared build with rdkafka library (Ivan)

ClickHouse Release 19.11

ClickHouse Release 19.11.13.74, 2019-11-01

Bug Fix

  • Fixed rare crash in ALTER MODIFY COLUMN and vertical merge when one of merged/altered parts is empty (0 rows). #6780 ()
  • Manual update of SIMDJSON. This fixes possible flooding of stderr files with bogus json diagnostic messages. #7548 ()
  • Fixed bug with mrk file extension for mutations (alesapin)

ClickHouse Release 19.11.12.69, 2019-10-02

Bug Fix

  • Fixed performance degradation of index analysis on complex keys on large tables. This fixes . #7075 ()
  • Avoid rare SIGSEGV while sending data in tables with Distributed engine (Failed to send batch: file with index XXXXX is absent). #7032 ()
  • Fix Unknown identifier with multiple joins. This fixes #5254. (Artem Zuikov)

ClickHouse Release 19.11.11.57, 2019-09-13

  • Fix logical error causing segfaults when selecting from Kafka empty topic. #6902 (Ivan)
  • Fix for function АrrayEnumerateUniqRanked with empty arrays in params. (proller)

ClickHouse Release 19.11.10.54, 2019-09-10

Bug Fix

  • Do store offsets for Kafka messages manually to be able to commit them all at once for all partitions. Fixes potential duplication in “one consumer - many partitions” scenario. (Ivan)
  • Improve error handling in cache dictionaries. (Vitaly Baranov)
  • Fixed bug in function arrayEnumerateUniqRanked. (proller)
  • Fix JSONExtract function while extracting a Tuple from JSON. (Vitaly Baranov)
  • Fixed possible data loss after ALTER DELETE query on table with skipping index. #6282 ()
  • Fixed performance test. #6392 ()
  • Parquet: Fix reading boolean columns. #6579 ()
  • Fixed wrong behaviour of nullIf function for constant arguments. #6518 () #6580 ()
  • Fix Kafka messages duplication problem on normal server restart. #6597 ()
  • Fixed an issue when long ALTER UPDATE or ALTER DELETE may prevent regular merges to run. Prevent mutations from executing if there is no enough free threads available. #6502 (tavplubix)
  • Fixed error with processing “timezone” in server configuration file. (alexey-milovidov)
  • Fix kafka tests. (Ivan)

Security Fix

  • If the attacker has write access to ZooKeeper and is able to run custom server available from the network where ClickHouse runs, it can create custom-built malicious server that will act as ClickHouse replica and register it in ZooKeeper. When another replica will fetch data part from malicious replica, it can force clickhouse-server to write to arbitrary path on filesystem. Found by Eldar Zaitov, information security team at Yandex. #6247 ()

ClickHouse Release 19.11.8.46, 2019-08-22

Bug Fix

  • Fix ALTER TABLE ... UPDATE query for tables with enable_mixed_granularity_parts=1. #6543 ()
  • Fix NPE when using IN clause with a subquery with a tuple. #6125 (tavplubix)
  • Fixed an issue that if a stale replica becomes alive, it may still have data parts that were removed by DROP PARTITION. #6523 ()
  • Fixed issue with parsing CSV #6426 (tavplubix)
  • Fixed data race in system.parts table and ALTER query. This fixes . #6513 ()
  • Fixed wrong code in mutations that may lead to memory corruption. Fixed segfault with read of address 0x14c0 that may happed due to concurrent DROP TABLE and SELECT from system.parts or system.parts_columns. Fixed race condition in preparation of mutation queries. Fixed deadlock caused by OPTIMIZE of Replicated tables and concurrent modification operations like ALTERs. #6514 ()

ClickHouse Release 19.11.7.40, 2019-08-14

Bug Fix

  • Kafka integration has been fixed in this version.
  • Fix segfault when using arrayReduce for constant arguments. #6326 ()
  • Fixed toFloat() monotonicity. #6374 ()
  • Fix segfault with enabled optimize_skip_unused_shards and missing sharding key. #6384 ()
  • Fixed logic of arrayEnumerateUniqRanked function. #6423 ()
  • Removed extra verbose logging from MySQL handler. #6389 ()
  • Fix wrong behavior and possible segfaults in topK and topKWeighted aggregated functions. #6404 ()
  • Do not expose virtual columns in system.columns table. This is required for backward compatibility. #6406 ()
  • Fix bug with memory allocation for string fields in complex key cache dictionary. #6447 ()
  • Fix bug with enabling adaptive granularity when creating new replica for Replicated*MergeTree table. #6452 ()
  • Fix infinite loop when reading Kafka messages. #6354 ()
  • Fixed the possibility of a fabricated query to cause server crash due to stack overflow in SQL parser and possibility of stack overflow in Merge and Distributed tables #6433 ()
  • Fixed Gorilla encoding error on small sequences. #6444 ()

Improvement

  • Allow user to override poll_interval and idle_connection_timeout settings on connection. (alexey-milovidov)

ClickHouse Release 19.11.5.28, 2019-08-05

Bug Fix

  • Fixed the possibility of hanging queries when server is overloaded. (alexey-milovidov)
  • Fix FPE in yandexConsistentHash function. This fixes . #6126 ()
  • Fixed bug in conversion of LowCardinality types in AggregateFunctionFactory. This fixes #6257. (Nikolai Kochetov)
  • Fix parsing of bool settings from true and false strings in configuration files. (alesapin)
  • Fix rare bug with incompatible stream headers in queries to Distributed table over MergeTree table when part of WHERE moves to PREWHERE. (alesapin)
  • Fixed overflow in integer division of signed type to unsigned type. This fixes . #6233 ()

Backward Incompatible Change

  • Kafka still broken.

ClickHouse Release 19.11.4.24, 2019-08-01

Bug Fix

  • Fix bug with writing secondary indices marks with adaptive granularity. (alesapin)
  • Fix WITH ROLLUP and WITH CUBE modifiers of GROUP BY with two-level aggregation. (Anton Popov)
  • Fixed hang in JSONExtractRaw function. Fixed #6198 ()
  • Fix segfault in ExternalLoader::reloadOutdated(). #6082 ()
  • Fixed the case when server may close listening sockets but not shutdown and continue serving remaining queries. You may end up with two running clickhouse-server processes. Sometimes, the server may return an error bad_function_call for remaining queries. #6231 ()
  • Fixed useless and incorrect condition on update field for initial loading of external dictionaries via ODBC, MySQL, ClickHouse and HTTP. This fixes #6069 (alexey-milovidov)
  • Fixed irrelevant exception in cast of LowCardinality(Nullable) to not-Nullable column in case if it does not contain Nulls (e.g. in query like SELECT CAST(CAST('Hello' AS LowCardinality(Nullable(String))) AS String). #6119 ()
  • Fix non-deterministic result of “uniq” aggregate function in extreme rare cases. The bug was present in all ClickHouse versions. #6058 ()
  • Segfault when we set a little bit too high CIDR on the function IPv6CIDRToRange. #6068 ()
  • Fixed small memory leak when server throw many exceptions from many different contexts. #6144 ()
  • Fix the situation when consumer got paused before subscription and not resumed afterwards. #6075 () Note that Kafka is broken in this version.
  • Clearing the Kafka data buffer from the previous read operation that was completed with an error #6026 () Note that Kafka is broken in this version.
  • Since StorageMergeTree::background_task_handle is initialized in startup() the MergeTreeBlockOutputStream::write() may try to use it before initialization. Just check if it is initialized. #6080 ()

Build/Testing/Packaging Improvement

  • Added official rpm packages. (proller) ()
  • Add an ability to build .rpm and .tgz packages with packager script. #5769 ()
  • Fixes for “Arcadia” build system. #6223 ()

Backward Incompatible Change

  • Kafka is broken in this version.

ClickHouse Release 19.11.3.11, 2019-07-18

New Feature

  • Added support for prepared statements. (Alexander) (alexey-milovidov)
  • DoubleDelta and Gorilla column codecs (Vasily Nemkov)
  • Added os_thread_priority setting that allows to control the “nice” value of query processing threads that is used by OS to adjust dynamic scheduling priority. It requires CAP_SYS_NICE capabilities to work. This implements #5909 ()
  • Implement _topic, _offset, _key columns for Kafka engine #5382 () Note that Kafka is broken in this version.
  • Add aggregate function combinator -Resample #5590 ()
  • Aggregate functions groupArrayMovingSum(win_size)(x) and groupArrayMovingAvg(win_size)(x), which calculate moving sum/avg with or without window-size limitation. #5595 ()
  • Add synonim arrayFlatten \<-> flatten #5764 ()
  • Intergate H3 function geoToH3 from Uber. #4724 () #5805 ()

Bug Fix

  • Implement DNS cache with asynchronous update. Separate thread resolves all hosts and updates DNS cache with period (setting dns_cache_update_period). It should help, when ip of hosts changes frequently. (Anton Popov)
  • Fix segfault in Delta codec which affects columns with values less than 32 bits size. The bug led to random memory corruption. (alesapin)
  • Fix segfault in TTL merge with non-physical columns in block. (Anton Popov)
  • Fix rare bug in checking of part with LowCardinality column. Previously checkDataPart always fails for part with LowCardinality column. (alesapin)
  • Avoid hanging connections when server thread pool is full. It is important for connections from remote table function or connections to a shard without replicas when there is long connection timeout. This fixes #5881 ()
  • Support for constant arguments to evalMLModel function. This fixes #5817 (alexey-milovidov)
  • Fixed the issue when ClickHouse determines default time zone as UCT instead of UTC. This fixes . #5828 ()
  • Fixed buffer underflow in visitParamExtractRaw. This fixes #5901 (alexey-milovidov)
  • Now distributed DROP/ALTER/TRUNCATE/OPTIMIZE ON CLUSTER queries will be executed directly on leader replica. (alesapin)
  • Fix coalesce for ColumnConst with ColumnNullable + related changes. (Artem Zuikov)
  • Fix the ReadBufferFromKafkaConsumer so that it keeps reading new messages after commit() even if it was stalled before (Ivan)
  • Fix FULL and RIGHT JOIN results when joining on Nullable keys in right table. (Artem Zuikov)
  • Possible fix of infinite sleeping of low-priority queries. (alexey-milovidov)
  • Fix race condition, which cause that some queries may not appear in query_log after SYSTEM FLUSH LOGS query. #5685 ()
  • Fixed heap-use-after-free ASan warning in ClusterCopier caused by watch which try to use already removed copier object. #5871 ()
  • Fixed wrong StringRef pointer returned by some implementations of IColumn::deserializeAndInsertFromArena. This bug affected only unit-tests. #5973 ()
  • Prevent source and intermediate array join columns of masking same name columns. #5941 ()
  • Fix insert and select query to MySQL engine with MySQL style identifier quoting. #5704 ()
  • Now CHECK TABLE query can work with MergeTree engine family. It returns check status and message if any for each part (or file in case of simplier engines). Also, fix bug in fetch of a broken part. #5865 ()
  • Fix SPLIT_SHARED_LIBRARIES runtime #5793 ()
  • Fixed time zone initialization when /etc/localtime is a relative symlink like ../usr/share/zoneinfo/Europe/Moscow #5922 ()
  • clickhouse-copier: Fix use-after free on shutdown #5752 ()
  • Updated simdjson. Fixed the issue that some invalid JSONs with zero bytes successfully parse. #5938 ()
  • Fix shutdown of SystemLogs #5802 ()
  • Fix hanging when condition in invalidate_query depends on a dictionary. #6011 ()

Improvement

  • Allow unresolvable addresses in cluster configuration. They will be considered unavailable and tried to resolve at every connection attempt. This is especially useful for Kubernetes. This fixes #5924 ()
  • Close idle TCP connections (with one hour timeout by default). This is especially important for large clusters with multiple distributed tables on every server, because every server can possibly keep a connection pool to every other server, and after peak query concurrency, connections will stall. This fixes #5879 (alexey-milovidov)
  • Better quality of topK function. Changed the SavingSpace set behavior to remove the last element if the new element have a bigger weight. #5850 ()
  • URL functions to work with domains now can work for incomplete URLs without scheme #5725 ()
  • Checksums added to the system.parts_columns table. #5874 ()
  • Added Enum data type as a synonim for Enum8 or Enum16. #5886 ()
  • Full bit transpose variant for T64 codec. Could lead to better compression with zstd. #5742 ()
  • Condition on startsWith function now can uses primary key. This fixes #5310 and #5919 ()
  • Allow to use clickhouse-copier with cross-replication cluster topology by permitting empty database name. #5745 ()
  • Use UTC as default timezone on a system without tzdata (e.g. bare Docker container). Before this patch, error message Could not determine local time zone was printed and server or client refused to start. #5827 ()
  • Returned back support for floating point argument in function quantileTiming for backward compatibility. #5911 ()
  • Show which table is missing column in error messages. #5768 ()
  • Disallow run query with same query_id by various users #5430 ()
  • More robust code for sending metrics to Graphite. It will work even during long multiple RENAME TABLE operation. #5875 ()
  • More informative error messages will be displayed when ThreadPool cannot schedule a task for execution. This fixes #5305 (alexey-milovidov)
  • Inverting ngramSearch to be more intuitive (Danila Kutenin)
  • Add user parsing in HDFS engine builder (akonyaev90)
  • Update default value of max_ast_elements parameter (Artem Konovalov)
  • Added a notion of obsolete settings. The obsolete setting allow_experimental_low_cardinality_type can be used with no effect. Alexey Milovidov

Performance Improvement

  • Increase number of streams to SELECT from Merge table for more uniform distribution of threads. Added setting max_streams_multiplier_for_merge_tables. This fixes #5797 (alexey-milovidov)

Build/Testing/Packaging Improvement

  • Add a backward compatibility test for client-server interaction with different versions of clickhouse. #5868 ()
  • Test coverage information in every commit and pull request. #5896 ()
  • Cooperate with address sanitizer to support our custom allocators (Arena and ArenaWithFreeLists) for better debugging of “use-after-free” errors. #5728 ()
  • Switch to LLVM libunwind implementation for C++ exception handling and for stack traces printing (Nikita Lapkov)
  • Add two more warnings from -Weverything (alexey-milovidov)
  • Allow to build ClickHouse with Memory Sanitizer. (alexey-milovidov)
  • Fixed ubsan report about bitTest function in fuzz test. (alexey-milovidov)
  • Docker: added possibility to init a ClickHouse instance which requires authentication. (Korviakov Andrey)
  • Update librdkafka to version 1.1.0 (Ivan)
  • Add global timeout for integration tests and disable some of them in tests code. (alesapin)
  • Fix some ThreadSanitizer failures. (akuzm)
  • The --no-undefined option forces the linker to check all external names for existence while linking. It’s very useful to track real dependencies between libraries in the split build mode. (Ivan)
  • Added performance test for #5914 ()
  • Fixed compatibility with gcc-7. #5840 ()
  • Added support for gcc-9. This fixes #5717 (alexey-milovidov)
  • Fixed error when libunwind can be linked incorrectly. (alexey-milovidov)
  • Fixed a few warnings found by PVS-Studio. (alexey-milovidov)
  • Added initial support for clang-tidy static analyzer. (alexey-milovidov)
  • Convert BSD/Linux endian macros( ‘be64toh’ and ‘htobe64’) to the Mac OS X equivalents (Fu Chen)
  • Improved integration tests guide. (Vladimir Chebotarev)
  • Fixing build at macosx + gcc9 (filimonov)
  • Fix a hard-to-spot typo: aggreAGte -> aggregate. (akuzm)
  • Fix freebsd build (proller)
  • Add link to experimental YouTube channel to website (Ivan Blinkov)
  • CMake: add option for coverage flags: WITH_COVERAGE (proller)
  • Fix initial size of some inline PODArray’s. (akuzm)
  • clickhouse-server.postinst: fix os detection for centos 6 (proller)
  • Added Arch linux package generation. (Vladimir Chebotarev)
  • Split Common/config.h by libs (dbms) (proller)
  • Fixes for “Arcadia” build platform (proller)
  • Fixes for unconventional build (gcc9, no submodules) (proller)
  • Require explicit type in unalignedStore because it was proven to be bug-prone (akuzm)
  • Fixes MacOS build (filimonov)
  • Performance test concerning the new JIT feature with bigger dataset, as requested here #5887 ()
  • Run stateful tests in stress test 12693e568722f11e19859742f56428455501fd2a ()

Backward Incompatible Change

  • Kafka is broken in this version.
  • Enable adaptive_index_granularity = 10MB by default for new MergeTree tables. If you created new MergeTree tables on version 19.11+, downgrade to versions prior to 19.6 will be impossible. (alesapin)
  • Removed obsolete undocumented embedded dictionaries that were used by Yandex.Metrica. The functions OSIn, SEIn, OSToRoot, SEToRoot, OSHierarchy, SEHierarchy are no longer available. If you are using these functions, write email to . Note: at the last moment we decided to keep these functions for a while. #5780 ()

ClickHouse Release 19.10.1.5, 2019-07-12

New Feature

  • Add new column codec: T64. Made for (U)IntX/EnumX/Data(Time)/DecimalX columns. It should be good for columns with constant or small range values. Codec itself allows enlarge or shrink data type without re-compression. #5557 ()
  • Add database engine MySQL that allow to view all the tables in remote MySQL server #5599 ()
  • bitmapContains implementation. It’s 2x faster than bitmapHasAny if the second bitmap contains one element. #5535 ()
  • Support for crc32 function (with behaviour exactly as in MySQL or PHP). Do not use it if you need a hash function. #5661 ()
  • Implemented SYSTEM START/STOP DISTRIBUTED SENDS queries to control asynchronous inserts into Distributed tables. #4935 ()

Bug Fix

  • Ignore query execution limits and max parts size for merge limits while executing mutations. (Anton Popov)
  • Fix bug which may lead to deduplication of normal blocks (extremely rare) and insertion of duplicate blocks (more often). (alesapin)
  • Fix of function arrayEnumerateUniqRanked for arguments with empty arrays (proller)
  • Don’t subscribe to Kafka topics without intent to poll any messages. (Ivan)
  • Make setting join_use_nulls get no effect for types that cannot be inside Nullable (Olga Khvostikova)
  • Fixed Incorrect size of index granularity errors (coraxster)
  • Fix Float to Decimal convert overflow (coraxster)
  • Flush buffer when WriteBufferFromHDFS’s destructor is called. This fixes writing into HDFS. (Xindong Peng)

Improvement

  • Treat empty cells in CSV as default values when the setting input_format_defaults_for_omitted_fields is enabled. #5625 ()
  • Non-blocking loading of external dictionaries. #5567 ()
  • Network timeouts can be dynamically changed for already established connections according to the settings. #4558 ()
  • Using “public_suffix_list” for functions firstSignificantSubdomain, cutToFirstSignificantSubdomain. It’s using a perfect hash table generated by gperf with a list generated from the file: https://publicsuffix.org/list/public_suffix_list.dat. (for example, now we recognize the domain ac.uk as non-significant). (Guillaume Tassery)
  • Adopted IPv6 data type in system tables; unified client info columns in system.processes and system.query_log (alexey-milovidov)
  • Using sessions for connections with MySQL compatibility protocol. #5476 (Yuriy Baranov)
  • Support more ALTER queries ON CLUSTER. #5613 ()
  • Support <logger> section in clickhouse-local config file. #5540 ()
  • Allow run query with remote table function in clickhouse-local #5627 ()

Performance Improvement

  • Add the possibility to write the final mark at the end of MergeTree columns. It allows to avoid useless reads for keys that are out of table data range. It is enabled only if adaptive index granularity is in use. (alesapin)
  • Improved performance of MergeTree tables on very slow filesystems by reducing number of stat syscalls. (alexey-milovidov)
  • Fixed performance degradation in reading from MergeTree tables that was introduced in version 19.6. Fixes #5631. (alexey-milovidov)

Build/Testing/Packaging Improvement

  • Implemented TestKeeper as an implementation of ZooKeeper interface used for testing #5643 () (levushkin aleksej)
  • From now on .sql tests can be run isolated by server, in parallel, with random database. It allows to run them faster, add new tests with custom server configurations, and be sure that different tests does not affect each other. (Ivan)
  • Remove <name> and <metrics> from performance tests (Olga Khvostikova)
  • Fixed “select_format” performance test for Pretty formats (alexey-milovidov)

ClickHouse Release 19.9

ClickHouse Release 19.9.3.31, 2019-07-05

Bug Fix

  • Fix segfault in Delta codec which affects columns with values less than 32 bits size. The bug led to random memory corruption. #5786 ()
  • Fix rare bug in checking of part with LowCardinality column. #5832 ()
  • Fix segfault in TTL merge with non-physical columns in block. #5819 ()
  • Fix potential infinite sleeping of low-priority queries. #5842 ()
  • Fix how ClickHouse determines default time zone as UCT instead of UTC. #5828 ()
  • Fix bug about executing distributed DROP/ALTER/TRUNCATE/OPTIMIZE ON CLUSTER queries on follower replica before leader replica. Now they will be executed directly on leader replica. #5757 ()
  • Fix race condition, which cause that some queries may not appear in query_log instantly after SYSTEM FLUSH LOGS query. #5685 ()
  • Added missing support for constant arguments to evalMLModel function. #5820 ()

ClickHouse Release 19.9.2.4, 2019-06-24

New Feature

  • Print information about frozen parts in system.parts table. #5471 ()
  • Ask client password on clickhouse-client start on tty if not set in arguments #5092 ()
  • Implement dictGet and dictGetOrDefault functions for Decimal types. #5394 ()

Improvement

  • Debian init: Add service stop timeout (proller)
  • Add setting forbidden by default to create table with suspicious types for LowCardinality (Olga Khvostikova)
  • Regression functions return model weights when not used as State in function evalMLMethod. (Quid37)
  • Rename and improve regression methods. (Quid37)
  • Clearer interfaces of string searchers. (Danila Kutenin)

Bug Fix

  • Fix potential data loss in Kafka #5445 ()
  • Fix potential infinite loop in PrettySpace format when called with zero columns #5560 ()
  • Fixed UInt32 overflow bug in linear models. Allow eval ML model for non-const model argument. #5516 ()
  • ALTER TABLE ... DROP INDEX IF EXISTS ... should not raise an exception if provided index does not exist #5524 ()
  • Fix segfault with bitmapHasAny in scalar subquery #5528 ()
  • Fixed error when replication connection pool does not retry to resolve host, even when DNS cache was dropped. #5534 ()
  • Fixed ALTER ... MODIFY TTL on ReplicatedMergeTree. #5539 ()
  • Fix INSERT into Distributed table with MATERIALIZED column #5429 ()
  • Fix bad alloc when truncate Join storage #5437 ()
  • In recent versions of package tzdata some of files are symlinks now. The current mechanism for detecting default timezone gets broken and gives wrong names for some timezones. Now at least we force the timezone name to the contents of TZ if provided. #5443 ()
  • Fix some extremely rare cases with MultiVolnitsky searcher when the constant needles in sum are at least 16KB long. The algorithm missed or overwrote the previous results which can lead to the incorrect result of multiSearchAny. #5588 ()
  • Fix the issue when settings for ExternalData requests couldn’t use ClickHouse settings. Also, for now, settings date_time_input_format and low_cardinality_allow_in_native_format cannot be used because of the ambiguity of names (in external data it can be interpreted as table format and in the query it can be a setting). #5455 ()
  • Fix bug when parts were removed only from FS without dropping them from Zookeeper. #5520 ()
  • Remove debug logging from MySQL protocol #5478 ()
  • Skip ZNONODE during DDL query processing #5489 ()
  • Fix mix UNION ALL result column type. There were cases with inconsistent data and column types of resulting columns. #5503 ()
  • Throw an exception on wrong integers in dictGetT functions instead of crash. #5446 ()
  • Fix wrong element_count and load_factor for hashed dictionary in system.dictionaries table. #5440 ()

Build/Testing/Packaging Improvement

  • Fixed build without Brotli HTTP compression support (ENABLE_BROTLI=OFF cmake variable). (Anton Yuzhaninov)
  • Include roaring.h as roaring/roaring.h (Orivej Desh)
  • Fix gcc9 warnings in hyperscan (#line directive is evil!) (Danila Kutenin)
  • Fix all warnings when compiling with gcc-9. Fix some contrib issues. Fix gcc9 ICE and submit it to bugzilla. (Danila Kutenin)
  • Fixed linking with lld (alexey-milovidov)
  • Remove unused specializations in dictionaries (Artem Zuikov)
  • Improvement performance tests for formatting and parsing tables for different types of files (Olga Khvostikova)
  • Fixes for parallel test run (proller)
  • Docker: use configs from clickhouse-test (proller)
  • Fix compile for FreeBSD (proller)
  • Upgrade boost to 1.70 (proller)
  • Fix build clickhouse as submodule (proller)
  • Improve JSONExtract performance tests (Vitaly Baranov)

ClickHouse Release 19.8

ClickHouse Release 19.8.3.8, 2019-06-11

New Features

  • Added functions to work with JSON #4686 () #5124. ()
  • Add a function basename, with a similar behaviour to a basename function, which exists in a lot of languages (os.path.basename in python, basename in PHP, etc…). Work with both an UNIX-like path or a Windows path. #5136 ()
  • Added LIMIT n, m BY or LIMIT m OFFSET n BY syntax to set offset of n for LIMIT BY clause. #5138 ()
  • Added new data type SimpleAggregateFunction, which allows to have columns with light aggregation in an AggregatingMergeTree. This can only be used with simple functions like any, anyLast, sum, min, max. #4629 ()
  • Added support for non-constant arguments in function ngramDistance #5198 ()
  • Added functions skewPop, skewSamp, kurtPop and kurtSamp to compute for sequence skewness, sample skewness, kurtosis and sample kurtosis respectively. #5200 ()
  • Support rename operation for MaterializeView storage. #5209 ()
  • Added server which allows connecting to ClickHouse using MySQL client. #4715 ()
  • Add toDecimal*OrZero and toDecimal*OrNull functions. #5291 ()
  • Support Decimal types in functions: quantile, quantiles, median, quantileExactWeighted, quantilesExactWeighted, medianExactWeighted. #5304 ()
  • Added toValidUTF8 function, which replaces all invalid UTF-8 characters by replacement character � (U+FFFD). #5322 ()
  • Added format function. Formatting constant pattern (simplified Python format pattern) with the strings listed in the arguments. #5330 ()
  • Added system.detached_parts table containing information about detached parts of MergeTree tables. #5353 ()
  • Added ngramSearch function to calculate the non-symmetric difference between needle and haystack. #5418 (Danila Kutenin)
  • Implementation of basic machine learning methods (stochastic linear regression and logistic regression) using aggregate functions interface. Has different strategies for updating model weights (simple gradient descent, momentum method, Nesterov method). Also supports mini-batches of custom size. (Quid37)
  • Implementation of geohashEncode and geohashDecode functions. (Vasily Nemkov)
  • Added aggregate function timeSeriesGroupSum, which can aggregate different time series that sample timestamp not alignment. It will use linear interpolation between two sample timestamp and then sum time-series together. Added aggregate function timeSeriesGroupRateSum, which calculates the rate of time-series and then sum rates together. (Yangkuan Liu)
  • Added functions IPv4CIDRtoIPv4Range and IPv6CIDRtoIPv6Range to calculate the lower and higher bounds for an IP in the subnet using a CIDR. (Guillaume Tassery)
  • Add a X-ClickHouse-Summary header when we send a query using HTTP with enabled setting send_progress_in_http_headers. Return the usual information of X-ClickHouse-Progress, with additional information like how many rows and bytes were inserted in the query. (Guillaume Tassery)

Improvements

  • Added max_parts_in_total setting for MergeTree family of tables (default: 100 000) that prevents unsafe specification of partition key #5166. #5171 ()
  • clickhouse-obfuscator: derive seed for individual columns by combining initial seed with column name, not column position. This is intended to transform datasets with multiple related tables, so that tables will remain JOINable after transformation. #5178 ()
  • Added functions JSONExtractRaw, JSONExtractKeyAndValues. Renamed functions jsonExtract<type> to JSONExtract<type>. When something goes wrong these functions return the correspondent values, not NULL. Modified function JSONExtract, now it gets the return type from its last parameter and does not inject nullables. Implemented fallback to RapidJSON in case AVX2 instructions are not available. Simdjson library updated to a new version. #5235 ()
  • Now if and multiIf functions do not rely on the condition’s Nullable, but rely on the branches for sql compatibility. #5238 ()
  • In predicate now generates Null result from Null input like the Equal function. #5152 ()
  • Check the time limit every (flush_interval / poll_timeout) number of rows from Kafka. This allows to break the reading from Kafka consumer more frequently and to check the time limits for the top-level streams #5249 ()
  • Batched version of RowRefList for ALL JOINS. #5267 ()
  • clickhouse-server: more informative listen error messages. #5268 ()
  • Support dictionaries in clickhouse-copier for functions in <sharding_key> #5270 ()
  • Add new setting kafka_commit_every_batch to regulate Kafka committing policy.
    It allows to set commit mode: after every batch of messages is handled, or after the whole block is written to the storage. It’s a trade-off between losing some messages or reading them twice in some extreme situations. #5308 ()
  • Make windowFunnel support other Unsigned Integer Types. #5320 ()
  • Allow to shadow virtual column _table in Merge engine. #5325 ()
  • Make sequenceMatch aggregate functions support other unsigned Integer types #5339 ()
  • Better error messages if checksum mismatch is most likely caused by hardware failures. #5355 ()
  • Check that underlying tables support sampling for StorageMerge #5366 ()
  • Сlose MySQL connections after their usage in external dictionaries. It is related to issue #893. #5395 ()
  • Improvements of MySQL Wire Protocol. Changed name of format to MySQLWire. Using RAII for calling RSA_free. Disabling SSL if context cannot be created. #5419 ()
  • clickhouse-client: allow to run with unaccessable history file (read-only, no disk space, file is directory, …). #5431 ()
  • Respect query settings in asynchronous INSERTs into Distributed tables. #4936 ()
  • Renamed functions leastSqr to simpleLinearRegression, LinearRegression to linearRegression, LogisticRegression to logisticRegression. #5391 ()

Performance Improvements

  • Parallelize processing of parts of non-replicated MergeTree tables in ALTER MODIFY query. (Ivan Kush)
  • Optimizations in regular expressions extraction. #5191 ()
  • Do not add right join key column to join result if it’s used only in join on section. #5260 ()
  • Freeze the Kafka buffer after first empty response. It avoids multiple invokations of ReadBuffer::next() for empty result in some row-parsing streams. #5283 ()
  • concat function optimization for multiple arguments. #5357 ()
  • Query optimisation. Allow push down IN statement while rewriting commа/cross join into inner one. #5396 ()
  • Upgrade our LZ4 implementation with reference one to have faster decompression. #5070 ()
  • Implemented MSD radix sort (based on kxsort), and partial sorting. #5129 ()

Bug Fixes

  • Fix push require columns with join (Winter Zhang)
  • Fixed bug, when ClickHouse is run by systemd, the command sudo service clickhouse-server forcerestart was not working as expected. (proller)
  • Fix http error codes in DataPartsExchange (interserver http server on 9009 port always returned code 200, even on errors). (proller)
  • Fix SimpleAggregateFunction for String longer than MAX_SMALL_STRING_SIZE (Azat Khuzhin)
  • Fix error for Decimal to Nullable(Decimal) conversion in IN. Support other Decimal to Decimal conversions (including different scales). (Artem Zuikov)
  • Fixed FPU clobbering in simdjson library that lead to wrong calculation of uniqHLL and uniqCombined aggregate function and math functions such as log. (alexey-milovidov)
  • Fixed handling mixed const/nonconst cases in JSON functions. (Vitaly Baranov)
  • Fix retention function. Now all conditions that satisfy in a row of data are added to the data state. (小路)
  • Fix result type for quantileExact with Decimals. (Artem Zuikov)

Documentation

  • Translate documentation for CollapsingMergeTree to chinese. #5168 ()
  • Translate some documentation about table engines to chinese.
    #5134

    (never lee)

Build/Testing/Packaging Improvements

  • Fix some sanitizer reports that show probable use-after-free.#5139 #5393 ()
  • Move performance tests out of separate directories for convenience. #5158 ()
  • Fix incorrect performance tests. #5255 ()
  • Added a tool to calculate checksums caused by bit flips to debug hardware issues. #5334 ()
  • Make runner script more usable. #5340 (filimonov)
  • Add small instruction how to write performance tests. (alesapin)
  • Add ability to make substitutions in create, fill and drop query in performance tests (Olga Khvostikova)

ClickHouse Release 19.7

ClickHouse Release 19.7.5.29, 2019-07-05

Bug Fix

  • Fix performance regression in some queries with JOIN. #5192 ()

ClickHouse Release 19.7.5.27, 2019-06-09

New Features

  • Added bitmap related functions bitmapHasAny and bitmapHasAll analogous to hasAny and hasAll functions for arrays. #5279 ()

Bug Fixes

  • Fix segfault on minmax INDEX with Null value. (Nikita Vasilev)
  • Mark all input columns in LIMIT BY as required output. It fixes ‘Not found column’ error in some distributed queries. (Constantin S. Pan)
  • Fix “Column ‘0’ already exists” error in SELECT .. PREWHERE on column with DEFAULT (proller)
  • Fix ALTER MODIFY TTL query on ReplicatedMergeTree. (Anton Popov)
  • Don’t crash the server when Kafka consumers have failed to start. (Ivan)
  • Fixed bitmap functions produce wrong result. (Andy Yang)
  • Fix element_count for hashed dictionary (do not include duplicates) (Azat Khuzhin)
  • Use contents of environment variable TZ as the name for timezone. It helps to correctly detect default timezone in some cases. (Ivan)
  • Do not try to convert integers in dictGetT functions, because it does not work correctly. Throw an exception instead. (Artem Zuikov)
  • Fix settings in ExternalData HTTP request. (Danila
    Kutenin
    )
  • Fix bug when parts were removed only from FS without dropping them from Zookeeper. (alesapin)
  • Fix segmentation fault in bitmapHasAny function. (Zhichang Yu)
  • Fixed error when replication connection pool does not retry to resolve host, even when DNS cache was dropped. (alesapin)
  • Fixed DROP INDEX IF EXISTS query. Now ALTER TABLE ... DROP INDEX IF EXISTS ... query does not raise an exception if provided index does not exist. (Gleb Novikov)
  • Fix union all supertype column. There were cases with inconsistent data and column types of resulting columns. (Artem Zuikov)
  • Skip ZNONODE during DDL query processing. Before if another node removes the znode in task queue, the one that
    did not process it, but already get list of children, will terminate the DDLWorker thread. (Azat Khuzhin)
  • Fix INSERT into Distributed() table with MATERIALIZED column. (Azat Khuzhin)

ClickHouse Release 19.7.3.9, 2019-05-30

New Features

  • Allow to limit the range of a setting that can be specified by user.
    These constraints can be set up in user settings profile.
    (Vitaly
    Baranov
    )
  • Add a second version of the function groupUniqArray with an optional
    max_size parameter that limits the size of the resulting array. This
    behavior is similar to groupArray(max_size)(x) function.
    (Guillaume
    Tassery
    )
  • For TSVWithNames/CSVWithNames input file formats, column order can now be
    determined from file header. This is controlled by
    input_format_with_names_use_header parameter.

    (Alexander)

Bug Fixes

  • Crash with uncompressed_cache + JOIN during merge (#5197)
    #5133 ()
  • Segmentation fault on a clickhouse-client query to system tables. #5066
    #5127
    ()
  • Data loss on heavy load via KafkaEngine (#4736)
    #5080
    ()
  • Fixed very rare data race condition that could happen when executing a query with UNION ALL involving at least two SELECTs from system.columns, system.tables, system.parts, system.parts_tables or tables of Merge family and performing ALTER of columns of the related tables concurrently. #5189 ()

Performance Improvements

Documentation

  • Translate documentation for some table engines to Chinese.
    #5107,
    ,
    #5087
    (),
    #5068 ()

Build/Testing/Packaging Improvements

ClickHouse Release 19.6

ClickHouse Release 19.6.3.18, 2019-06-13

Bug Fixes

  • Fixed IN condition pushdown for queries from table functions mysql and odbc and corresponding table engines. This fixes #3540 and #2384. #5313 ()
  • Fix deadlock in Zookeeper. #5297 ()
  • Allow quoted decimals in CSV. #5284 (
  • Disallow conversion from float Inf/NaN into Decimals (throw exception). #5282 ()
  • Fix data race in rename query. #5247 ()
  • Temporarily disable LFAlloc. Usage of LFAlloc might lead to a lot of MAP_FAILED in allocating UncompressedCache and in a result to crashes of queries at high loaded servers. cfdba93()

ClickHouse Release 19.6.2.11, 2019-05-13

New Features

  • TTL expressions for columns and tables. #4212 ()
  • Added support for brotli compression for HTTP responses (Accept-Encoding: br) #4388 ()
  • Added new function isValidUTF8 for checking whether a set of bytes is correctly utf-8 encoded. #4934 ()
  • Add new load balancing policy first_or_random which sends queries to the first specified host and if it’s inaccessible send queries to random hosts of shard. Useful for cross-replication topology setups. #5012 ()

Experimental Features

  • Add setting index_granularity_bytes (adaptive index granularity) for MergeTree* tables family. (alesapin)

Improvements

  • Added support for non-constant and negative size and length arguments for function substringUTF8. #4989 ()
  • Disable push-down to right table in left join, left table in right join, and both tables in full join. This fixes wrong JOIN results in some cases. #4846 ()
  • clickhouse-copier: auto upload task configuration from --task-file option #4876 ()
  • Added typos handler for storage factory and table functions factory. #4891 ()
  • Support asterisks and qualified asterisks for multiple joins without subqueries #4898 ()
  • Make missing column error message more user friendly. #4915 ()

Performance Improvements

Backward Incompatible Changes

  • HTTP header Query-Id was renamed to X-ClickHouse-Query-Id for consistency. #4972 ()

Bug Fixes

  • Fixed potential null pointer dereference in clickhouse-copier. (proller)
  • Fixed error on query with JOIN + ARRAY JOIN (Artem Zuikov)
  • Fixed hanging on start of the server when a dictionary depends on another dictionary via a database with engine=Dictionary. (Vitaly Baranov)
  • Partially fix distributed_product_mode = local. It’s possible to allow columns of local tables in where/having/order by/… via table aliases. Throw exception if table does not have alias. There’s not possible to access to the columns without table aliases yet. (Artem Zuikov)
  • Fix potentially wrong result for SELECT DISTINCT with JOIN (Artem Zuikov)
  • Fixed very rare data race condition that could happen when executing a query with UNION ALL involving at least two SELECTs from system.columns, system.tables, system.parts, system.parts_tables or tables of Merge family and performing ALTER of columns of the related tables concurrently. (alexey-milovidov)

Build/Testing/Packaging Improvements

  • Fixed test failures when running clickhouse-server on different host #4713 ()
  • clickhouse-test: Disable color control sequences in non tty environment. #4937 ()
  • clickhouse-test: Allow use any test database (remove test. qualification where it possible) #5008 ()
  • Fix ubsan errors #5037 ()
  • Yandex LFAlloc was added to ClickHouse to allocate MarkCache and UncompressedCache data in different ways to catch segfaults more reliable #4995 ()
  • Python util to help with backports and changelogs. #4949 ()

ClickHouse Release 19.5

ClickHouse Release 19.5.4.22, 2019-05-13

Bug Fixes

  • Fixed possible crash in bitmap* functions #5228 ()
  • Fixed very rare data race condition that could happen when executing a query with UNION ALL involving at least two SELECTs from system.columns, system.tables, system.parts, system.parts_tables or tables of Merge family and performing ALTER of columns of the related tables concurrently. #5189 ()
  • Fixed error Set for IN is not created yet in case of using single LowCardinality column in the left part of IN. This error happened if LowCardinality column was the part of primary key. #5031 #5154 ()
  • Modification of retention function: If a row satisfies both the first and NTH condition, only the first satisfied condition is added to the data state. Now all conditions that satisfy in a row of data are added to the data state. #5119 ()

ClickHouse Release 19.5.3.8, 2019-04-18

Bug Fixes

  • Fixed type of setting max_partitions_per_insert_block from boolean to UInt64. #5028 ()

ClickHouse Release 19.5.2.6, 2019-04-15

New Features

  • Hyperscan multiple regular expression matching was added (functions multiMatchAny, multiMatchAnyIndex, multiFuzzyMatchAny, multiFuzzyMatchAnyIndex). , #4841 ()
  • multiSearchFirstPosition function was added. #4780 ()
  • Implement the predefined expression filter per row for tables. #4792 ()
  • A new type of data skipping indices based on bloom filters (can be used for equal, in and like functions). #4499 ()
  • Added ASOF JOIN which allows to run queries that join to the most recent value known. #4774 #4863 (Martijn Bakker, )
  • Rewrite multiple COMMA JOIN to CROSS JOIN. Then rewrite them to INNER JOIN if possible. #4661 ()

Improvement

  • topK and topKWeighted now supports custom loadFactor (fixes issue ). #4634 ()
  • Allow to use parallel_replicas_count > 1 even for tables without sampling (the setting is simply ignored for them). In previous versions it was lead to exception. #4637 ()
  • Support for CREATE OR REPLACE VIEW. Allow to create a view or set a new definition in a single statement. #4654 ()
  • Buffer table engine now supports PREWHERE. #4671 ()
  • Add ability to start replicated table without metadata in zookeeper in readonly mode. #4691 ()
  • Fixed flicker of progress bar in clickhouse-client. The issue was most noticeable when using FORMAT Null with streaming queries. #4811 ()
  • Allow to disable functions with hyperscan library on per user basis to limit potentially excessive and uncontrolled resource usage. #4816 ()
  • Add version number logging in all errors. #4824 ()
  • Added restriction to the multiMatch functions which requires string size to fit into unsigned int. Also added the number of arguments limit to the multiSearch functions. #4834 ()
  • Improved usage of scratch space and error handling in Hyperscan. #4866 ()
  • Fill system.graphite_detentions from a table config of *GraphiteMergeTree engine tables. #4584 ()
  • Rename trigramDistance function to and add more functions with CaseInsensitive and UTF. #4602 ()
  • Improved data skipping indices calculation. #4640 ()
  • Keep ordinary, DEFAULT, MATERIALIZED and ALIAS columns in a single list (fixes issue #2867). (Alex Zatelepin)

Bug Fix

  • Avoid std::terminate in case of memory allocation failure. Now std::bad_alloc exception is thrown as expected. #4665 ()
  • Fixes capnproto reading from buffer. Sometimes files wasn’t loaded successfully by HTTP. #4674 ()
  • Fix error Unknown log entry type: 0 after OPTIMIZE TABLE FINAL query. #4683 ()
  • Wrong arguments to hasAny or hasAll functions may lead to segfault. #4698 ()
  • Deadlock may happen while executing DROP DATABASE dictionary query. #4701 ()
  • Fix undefined behavior in median and quantile functions. #4702 ()
  • Fix compression level detection when network_compression_method in lowercase. Broken in v19.1. #4706 ()
  • Fixed ignorance of <timezone>UTC</timezone> setting (fixes issue #4658). (proller)
  • Fix histogram function behaviour with Distributed tables. (olegkv)
  • Fixed tsan report destroy of a locked mutex. (alexey-milovidov)
  • Fixed TSan report on shutdown due to race condition in system logs usage. Fixed potential use-after-free on shutdown when part_log is enabled. (alexey-milovidov)
  • Fix recheck parts in ReplicatedMergeTreeAlterThread in case of error. (Nikolai Kochetov)
  • Arithmetic operations on intermediate aggregate function states were not working for constant arguments (such as subquery results). (alexey-milovidov)
  • Always backquote column names in metadata. Otherwise it’s impossible to create a table with column named index (server won’t restart due to malformed ATTACH query in metadata). (alexey-milovidov)
  • Fix crash in ALTER ... MODIFY ORDER BY on Distributed table. (TCeason)
  • Fix segfault in JOIN ON with enabled enable_optimize_predicate_expression. (Winter Zhang)
  • Fix bug with adding an extraneous row after consuming a protobuf message from Kafka. (Vitaly Baranov)
  • Fix crash of JOIN on not-nullable vs nullable column. Fix NULLs in right keys in ANY JOIN + join_use_nulls. (Artem Zuikov)
  • Fix segmentation fault in clickhouse-copier. (proller)
  • Fixed race condition in SELECT from system.tables if the table is renamed or altered concurrently. (alexey-milovidov)
  • Fixed data race when fetching data part that is already obsolete. (alexey-milovidov)
  • Fixed rare data race that can happen during RENAME table of MergeTree family. (alexey-milovidov)
  • Fixed segmentation fault in function arrayIntersect. Segmentation fault could happen if function was called with mixed constant and ordinary arguments. (Lixiang Qian)
  • Fixed reading from Array(LowCardinality) column in rare case when column contained a long sequence of empty arrays. (Nikolai Kochetov)
  • Fix crash in FULL/RIGHT JOIN when we joining on nullable vs not nullable. (Artem Zuikov)
  • Fix No message received exception while fetching parts between replicas. (alesapin)
  • Fixed arrayIntersect function wrong result in case of several repeated values in single array. (Nikolai Kochetov)
  • Fix a race condition during concurrent ALTER COLUMN queries that could lead to a server crash (fixes issue ). #4592 ()
  • Fix incorrect result in FULL/RIGHT JOIN with const column. #4723 ()
  • Fix duplicates in GLOBAL JOIN with asterisk. #4705 ()
  • Fix parameter deduction in ALTER MODIFY of column CODEC when column type is not specified. #4883 ()
  • Functions cutQueryStringAndFragment() and queryStringAndFragment() now works correctly when URL contains a fragment and no query. #4894 ()
  • Fix rare bug when setting min_bytes_to_use_direct_io is greater than zero, which occures when thread have to seek backward in column file. #4897 ()
  • Fix wrong argument types for aggregate functions with LowCardinality arguments (fixes issue #4919). (Nikolai Kochetov)
  • Fix wrong name qualification in GLOBAL JOIN. (Artem Zuikov)
  • Fix function toISOWeek result for year 1970. (alexey-milovidov)
  • Fix DROP, TRUNCATE and OPTIMIZE queries duplication, when executed on ON CLUSTER for ReplicatedMergeTree* tables family. (alesapin)

Backward Incompatible Change

  • Rename setting insert_sample_with_metadata to setting input_format_defaults_for_omitted_fields. #4771 ()
  • Added setting max_partitions_per_insert_block (with value 100 by default). If inserted block contains larger number of partitions, an exception is thrown. Set it to 0 if you want to remove the limit (not recommended). #4845 ()
  • Multi-search functions were renamed (multiPosition to multiSearchAllPositions, multiSearch to multiSearchAny, firstMatch to multiSearchFirstIndex). #4780 ()

Performance Improvement

  • Optimize Volnitsky searcher by inlining, giving about 5-10% search improvement for queries with many needles or many similar bigrams. (Danila Kutenin)
  • Fix performance issue when setting use_uncompressed_cache is greater than zero, which appeared when all read data contained in cache. (alesapin)

Build/Testing/Packaging Improvement

  • Hardening debug build: more granular memory mappings and ASLR; add memory protection for mark cache and index. This allows to find more memory stomping bugs in case when ASan and MSan cannot do it. #4632 ()
  • Add support for cmake variables ENABLE_PROTOBUF, ENABLE_PARQUET and ENABLE_BROTLI which allows to enable/disable the above features (same as we can do for librdkafka, mysql, etc). #4669 ()
  • Add ability to print process list and stacktraces of all threads if some queries are hung after test run. #4675 ()
  • Add retries on Connection loss error in clickhouse-test. #4682 ()
  • Add freebsd build with vagrant and build with thread sanitizer to packager script. #4712 (alesapin)
  • Now user asked for password for user 'default' during installation. (proller)
  • Suppress warning in rdkafka library. (alexey-milovidov)
  • Allow ability to build without ssl. (proller)
  • Add a way to launch clickhouse-server image from a custom user. (Mikhail f. Shiryaev)
  • Upgrade contrib boost to 1.69. (proller)
  • Disable usage of mremap when compiled with Thread Sanitizer. Surprisingly enough, TSan does not intercept mremap (though it does intercept mmap, munmap) that leads to false positives. Fixed TSan report in stateful tests. (alexey-milovidov)
  • Add test checking using format schema via HTTP interface. (Vitaly Baranov)

Bug Fixes

  • Avoid std::terminate in case of memory allocation failure. Now std::bad_alloc exception is thrown as expected. #4665 ()
  • Fixes capnproto reading from buffer. Sometimes files wasn’t loaded successfully by HTTP. #4674 ()
  • Fix error Unknown log entry type: 0 after OPTIMIZE TABLE FINAL query. #4683 ()
  • Wrong arguments to hasAny or hasAll functions may lead to segfault. #4698 ()
  • Deadlock may happen while executing DROP DATABASE dictionary query. #4701 ()
  • Fix undefined behavior in median and quantile functions. #4702 ()
  • Fix compression level detection when network_compression_method in lowercase. Broken in v19.1. #4706 ()
  • Fixed ignorance of <timezone>UTC</timezone> setting (fixes issue #4658). (proller)
  • Fix histogram function behaviour with Distributed tables. (olegkv)
  • Fixed tsan report destroy of a locked mutex. (alexey-milovidov)
  • Fixed TSan report on shutdown due to race condition in system logs usage. Fixed potential use-after-free on shutdown when part_log is enabled. (alexey-milovidov)
  • Fix recheck parts in ReplicatedMergeTreeAlterThread in case of error. (Nikolai Kochetov)
  • Arithmetic operations on intermediate aggregate function states were not working for constant arguments (such as subquery results). (alexey-milovidov)
  • Always backquote column names in metadata. Otherwise it’s impossible to create a table with column named index (server won’t restart due to malformed ATTACH query in metadata). (alexey-milovidov)
  • Fix crash in ALTER ... MODIFY ORDER BY on Distributed table. (TCeason)
  • Fix segfault in JOIN ON with enabled enable_optimize_predicate_expression. (Winter Zhang)
  • Fix bug with adding an extraneous row after consuming a protobuf message from Kafka. (Vitaly Baranov)
  • Fix segmentation fault in clickhouse-copier. (proller)
  • Fixed race condition in SELECT from system.tables if the table is renamed or altered concurrently. (alexey-milovidov)
  • Fixed data race when fetching data part that is already obsolete. (alexey-milovidov)
  • Fixed rare data race that can happen during RENAME table of MergeTree family. (alexey-milovidov)
  • Fixed segmentation fault in function arrayIntersect. Segmentation fault could happen if function was called with mixed constant and ordinary arguments. (Lixiang Qian)
  • Fixed reading from Array(LowCardinality) column in rare case when column contained a long sequence of empty arrays. (Nikolai Kochetov)
  • Fix No message received exception while fetching parts between replicas. (alesapin)
  • Fixed arrayIntersect function wrong result in case of several repeated values in single array. (Nikolai Kochetov)
  • Fix a race condition during concurrent ALTER COLUMN queries that could lead to a server crash (fixes issue ). #4592 ()
  • Fix parameter deduction in ALTER MODIFY of column CODEC when column type is not specified. #4883 ()
  • Functions cutQueryStringAndFragment() and queryStringAndFragment() now works correctly when URL contains a fragment and no query. #4894 ()
  • Fix rare bug when setting min_bytes_to_use_direct_io is greater than zero, which occures when thread have to seek backward in column file. #4897 ()
  • Fix wrong argument types for aggregate functions with LowCardinality arguments (fixes issue #4919). (Nikolai Kochetov)
  • Fix function toISOWeek result for year 1970. (alexey-milovidov)
  • Fix DROP, TRUNCATE and OPTIMIZE queries duplication, when executed on ON CLUSTER for ReplicatedMergeTree* tables family. (alesapin)

Improvements

  • Keep ordinary, DEFAULT, MATERIALIZED and ALIAS columns in a single list (fixes issue #2867). (Alex Zatelepin)

ClickHouse Release 19.4.3.11, 2019-04-02

Bug Fixes

  • Fix crash in FULL/RIGHT JOIN when we joining on nullable vs not nullable. (Artem Zuikov)
  • Fix segmentation fault in clickhouse-copier. (proller)

Build/Testing/Packaging Improvement

  • Add a way to launch clickhouse-server image from a custom user. #4753 ()

ClickHouse Release 19.4.2.7, 2019-03-30

Bug Fixes

  • Fixed reading from Array(LowCardinality) column in rare case when column contained a long sequence of empty arrays. #4850 ()

ClickHouse Release 19.4.1.3, 2019-03-19

Bug Fixes

  • Fixed remote queries which contain both LIMIT BY and LIMIT. Previously, if LIMIT BY and LIMIT were used for remote query, LIMIT could happen before LIMIT BY, which led to too filtered result. #4708 ()

ClickHouse Release 19.4.0.49, 2019-03-09

New Features

  • Added full support for Protobuf format (input and output, nested data structures). #4174 (Vitaly Baranov)
  • Added bitmap functions with Roaring Bitmaps. (Andy Yang) (Vitaly Baranov)
  • Parquet format support. (proller)
  • N-gram distance was added for fuzzy string comparison. It is similar to q-gram metrics in R language. (Danila Kutenin)
  • Combine rules for graphite rollup from dedicated aggregation and retention patterns. (Mikhail f. Shiryaev)
  • Added max_execution_speed and max_execution_speed_bytes to limit resource usage. Added min_execution_speed_bytes setting to complement the min_execution_speed. (Winter Zhang)
  • Implemented function flatten. #4409 (, kzon)
  • Added functions arrayEnumerateDenseRanked and arrayEnumerateUniqRanked (it’s like arrayEnumerateUniq but allows to fine tune array depth to look inside multidimensional arrays). (proller) (alexey-milovidov)
  • Multiple JOINS with some restrictions: no asterisks, no complex aliases in ON/WHERE/GROUP BY/… (Artem Zuikov)

Bug Fixes

  • This release also contains all bug fixes from 19.3 and 19.1.
  • Fixed bug in data skipping indices: order of granules after INSERT was incorrect. #4407 ()
  • Fixed set index for Nullable and LowCardinality columns. Before it, set index with Nullable or LowCardinality column led to error Data type must be deserialized with multiple streams while selecting. #4594 ()
  • Correctly set update_time on full executable dictionary update. #4551 ()
  • Fix broken progress bar in 19.3. #4627 ()
  • Fixed inconsistent values of MemoryTracker when memory region was shrinked, in certain cases. #4619 ()
  • Fixed undefined behaviour in ThreadPool. #4612 ()
  • Fixed a very rare crash with the message mutex lock failed: Invalid argument that could happen when a MergeTree table was dropped concurrently with a SELECT. #4608 ()
  • ODBC driver compatibility with LowCardinality data type. #4381 ()
  • FreeBSD: Fixup for AIOcontextPool: Found io_event with unknown id 0 error. #4438 ()
  • system.part_log table was created regardless to configuration. #4483 ()
  • Fix undefined behaviour in dictIsIn function for cache dictionaries. #4515 ()
  • Fixed a deadlock when a SELECT query locks the same table multiple times (e.g. from different threads or when executing multiple subqueries) and there is a concurrent DDL query. #4535 ()
  • Disable compile_expressions by default until we get own llvm contrib and can test it with clang and asan. #4579 ()
  • Prevent std::terminate when invalidate_query for clickhouse external dictionary source has returned wrong resultset (empty or more than one row or more than one column). Fixed issue when the invalidate_query was performed every five seconds regardless to the lifetime. #4583 ()
  • Avoid deadlock when the invalidate_query for a dictionary with clickhouse source was involving system.dictionaries table or Dictionaries database (rare case). #4599 ()
  • Fixes for CROSS JOIN with empty WHERE. #4598 ()
  • Fixed segfault in function “replicate” when constant argument is passed. #4603 ()
  • Fix lambda function with predicate optimizer. #4408 ()
  • Multiple JOINs multiple fixes. #4595 ()

Improvements

  • Support aliases in JOIN ON section for right table columns. (Artem Zuikov)
  • Result of multiple JOINs need correct result names to be used in subselects. Replace flat aliases with source names in result. (Artem Zuikov)
  • Improve push-down logic for joined statements. (Ivan)

Performance Improvements

  • Improved heuristics of “move to PREWHERE” optimization. #4405 ()
  • Use proper lookup tables that uses HashTable’s API for 8-bit and 16-bit keys. #4536 ()
  • Improved performance of string comparison. #4564 ()
  • Cleanup distributed DDL queue in a separate thread so that it does not slow down the main loop that processes distributed DDL tasks. #4502 ()
  • When min_bytes_to_use_direct_io is set to 1, not every file was opened with O_DIRECT mode because the data size to read was sometimes underestimated by the size of one compressed block. #4526 ()

Build/Testing/Packaging Improvement

  • Added support for clang-9 (alexey-milovidov)
  • Fix wrong __asm__ instructions (again) (Konstantin Podshumok)
  • Add ability to specify settings for clickhouse-performance-test from command line. (alesapin)
  • Add dictionaries tests to integration tests. (alesapin)
  • Added queries from the benchmark on the website to automated performance tests. (alexey-milovidov)
  • xxhash.h does not exist in external lz4 because it is an implementation detail and its symbols are namespaced with XXH_NAMESPACE macro. When lz4 is external, xxHash has to be external too, and the dependents have to link to it. (Orivej Desh)
  • Fixed a case when quantileTiming aggregate function can be called with negative or floating point argument (this fixes fuzz test with undefined behaviour sanitizer). (alexey-milovidov)
  • Spelling error correction. (sdk2)
  • Fix compilation on Mac. (Vitaly Baranov)
  • Build fixes for FreeBSD and various unusual build configurations. (proller)

ClickHouse Release 19.3

ClickHouse Release 19.3.9.1, 2019-04-02

Bug Fixes

  • Fix crash in FULL/RIGHT JOIN when we joining on nullable vs not nullable. #4855 ()
  • Fix segmentation fault in clickhouse-copier. #4835 ()
  • Fixed reading from Array(LowCardinality) column in rare case when column contained a long sequence of empty arrays. #4850 ()

Build/Testing/Packaging Improvement

ClickHouse Release 19.3.7, 2019-03-12

Bug Fixes

  • Fixed error in #3920. This error manifests itself as random cache corruption (messages Unknown codec family code, Cannot seek through file) and segfaults. This bug first appeared in version 19.1 and is present in versions up to 19.1.10 and 19.3.6. (alexey-milovidov)

ClickHouse Release 19.3.6, 2019-03-02

Bug Fixes

  • When there are more than 1000 threads in a thread pool, std::terminate may happen on thread exit. #4485 (alexey-milovidov)
  • Now it’s possible to create ReplicatedMergeTree* tables with comments on columns without defaults and tables with columns codecs without comments and defaults. Also fix comparison of codecs. (alesapin)
  • Fixed crash on JOIN with array or tuple. (Artem Zuikov)
  • Fixed crash in clickhouse-copier with the message ThreadStatus not created. (Artem Zuikov)
  • Fixed hangup on server shutdown if distributed DDLs were used. (Alex Zatelepin)
  • Incorrect column numbers were printed in error message about text format parsing for columns with number greater than 10. (alexey-milovidov)

Build/Testing/Packaging Improvements

  • Fixed build with AVX enabled. #4527 ()
  • Enable extended accounting and IO accounting based on good known version instead of kernel under which it is compiled. #4541 ()
  • Allow to skip setting of core_dump.size_limit, warning instead of throw if limit set fail. #4473 ()
  • Removed the inline tags of void readBinary(...) in Field.cpp. Also merged redundant namespace DB blocks. #4530 ()

ClickHouse Release 19.3.5, 2019-02-21

Bug Fixes

  • Fixed bug with large http insert queries processing. #4454 ()
  • Fixed backward incompatibility with old versions due to wrong implementation of send_logs_level setting. #4445 ()
  • Fixed backward incompatibility of table function remote introduced with column comments. #4446 ()

ClickHouse Release 19.3.4, 2019-02-16

Improvements

  • Table index size is not accounted for memory limits when doing ATTACH TABLE query. Avoided the possibility that a table cannot be attached after being detached. #4396 ()
  • Slightly raised up the limit on max string and array size received from ZooKeeper. It allows to continue to work with increased size of CLIENT_JVMFLAGS=-Djute.maxbuffer=... on ZooKeeper. #4398 ()
  • Allow to repair abandoned replica even if it already has huge number of nodes in its queue. #4399 ()
  • Add one required argument to SET index (max stored rows number). #4386 ()

Bug Fixes

  • Fixed WITH ROLLUP result for group by single LowCardinality key. (Nikolai Kochetov)
  • Fixed bug in the set index (dropping a granule if it contains more than max_rows rows). (Nikita Vasilev)
  • A lot of FreeBSD build fixes. (proller)
  • Fixed aliases substitution in queries with subquery containing same alias (issue ). #4351 ()

Build/Testing/Packaging Improvements

  • Add ability to run clickhouse-server for stateless tests in docker image. (Vasily Nemkov)

ClickHouse Release 19.3.3, 2019-02-13

New Features

  • Added the KILL MUTATION statement that allows removing mutations that are for some reasons stuck. Added latest_failed_part, latest_fail_time, latest_fail_reason fields to the system.mutations table for easier troubleshooting. (Alex Zatelepin)
  • Added aggregate function entropy which computes Shannon entropy. (Quid37)
  • Added ability to send queries INSERT INTO tbl VALUES (.... to server without splitting on query and data parts. (alesapin)
  • Generic implementation of arrayWithConstant function was added. (alexey-milovidov)
  • Implemented NOT BETWEEN comparison operator. (Dmitry Naumov)
  • Implement sumMapFiltered in order to be able to limit the number of keys for which values will be summed by sumMap. (Léo Ercolanelli)
  • Added support of Nullable types in mysql table function. (Emmanuel Donin de Rosière)
  • Support for arbitrary constant expressions in LIMIT clause. (k3box)
  • Added topKWeighted aggregate function that takes additional argument with (unsigned integer) weight. (Andrew Golman)
  • StorageJoin now supports join_any_take_last_row setting that allows overwriting existing values of the same key. (Amos Bird
  • Added function toStartOfInterval. (Vitaly Baranov)
  • Added RowBinaryWithNamesAndTypes format. (Oleg V. Kozlyuk)
  • Added IPv4 and IPv6 data types. More effective implementations of IPv* functions. (Vasily Nemkov)
  • Added function toStartOfTenMinutes(). (Vitaly Baranov)
  • Added Protobuf output format. #4158 ()
  • Added brotli support for HTTP interface for data import (INSERTs). #4235 ()
  • Added hints while user make typo in function name or type in command line client. #4239 ()
  • Added Query-Id to Server’s HTTP Response header. #4231 ()

Experimental Features

  • Added minmax and set data skipping indices for MergeTree table engines family. (Nikita Vasilev)
  • Added conversion of CROSS JOIN to INNER JOIN if possible. #4266 ()

Bug Fixes

  • Fixed Not found column for duplicate columns in JOIN ON section. (Artem Zuikov)
  • Make START REPLICATED SENDS command start replicated sends. (nvartolomei)
  • Fixed aggregate functions execution with Array(LowCardinality) arguments. (KochetovNicolai)
  • Fixed wrong behaviour when doing INSERT ... SELECT ... FROM file(...) query and file has CSVWithNames or TSVWIthNames format and the first data row is missing. (alexey-milovidov)
  • Fixed crash on dictionary reload if dictionary not available. This bug was appeared in 19.1.6. (proller)
  • Fixed ALL JOIN with duplicates in right table. (Artem Zuikov)
  • Fixed segmentation fault with use_uncompressed_cache=1 and exception with wrong uncompressed size. This bug was appeared in 19.1.6. (alesapin)
  • Fixed compile_expressions bug with comparison of big (more than int16) dates. (alesapin)
  • Fixed infinite loop when selecting from table function numbers(0). (alexey-milovidov)
  • Temporarily disable predicate optimization for ORDER BY. (Winter Zhang)
  • Fixed Illegal instruction error when using base64 functions on old CPUs. This error has been reproduced only when ClickHouse was compiled with gcc-8. (alexey-milovidov)
  • Fixed No message received error when interacting with PostgreSQL ODBC Driver through TLS connection. Also fixes segfault when using MySQL ODBC Driver. (alexey-milovidov)
  • Fixed incorrect result when Date and DateTime arguments are used in branches of conditional operator (function if). Added generic case for function if. (alexey-milovidov)
  • ClickHouse dictionaries now load within clickhouse process. (alexey-milovidov)
  • Fixed deadlock when SELECT from a table with File engine was retried after No such file or directory error. (alexey-milovidov)
  • Fixed race condition when selecting from system.tables may give table does not exist error. (alexey-milovidov)
  • clickhouse-client can segfault on exit while loading data for command line suggestions if it was run in interactive mode. (alexey-milovidov)
  • Fixed a bug when the execution of mutations containing IN operators was producing incorrect results. (Alex Zatelepin)
  • Fixed error: if there is a database with Dictionary engine, all dictionaries forced to load at server startup, and if there is a dictionary with ClickHouse source from localhost, the dictionary cannot load. (alexey-milovidov)
  • Fixed error when system logs are tried to create again at server shutdown. (alexey-milovidov)
  • Correctly return the right type and properly handle locks in joinGet function. (Amos Bird)
  • Added sumMapWithOverflow function. (Léo Ercolanelli)
  • Fixed segfault with allow_experimental_multiple_joins_emulation. (Artem Zuikov)
  • Fixed bug with incorrect Date and DateTime comparison. (valexey)
  • Fixed fuzz test under undefined behavior sanitizer: added parameter type check for quantile*Weighted family of functions. (alexey-milovidov)
  • Fixed rare race condition when removing of old data parts can fail with File not found error. (alexey-milovidov)
  • Fix install package with missing /etc/clickhouse-server/config.xml. (proller)

Build/Testing/Packaging Improvements

  • Debian package: correct /etc/clickhouse-server/preprocessed link according to config. #4205 ()
  • Various build fixes for FreeBSD. #4225 ()
  • Added ability to create, fill and drop tables in perftest. #4220 ()
  • Added a script to check for duplicate includes. #4326 ()
  • Added ability to run queries by index in performance test. #4264 ()
  • Package with debug symbols is suggested to be installed. #4274 ()
  • Refactoring of performance-test. Better logging and signals handling. #4171 ()
  • Added docs to anonymized Yandex.Metrika datasets. #4164 ()
  • Аdded tool for converting an old month-partitioned part to the custom-partitioned format. #4195 ()
  • Added docs about two datasets in s3. #4144 ()
  • Added script which creates changelog from pull requests description. #4169 (KochetovNicolai) ()
  • Added puppet module for ClickHouse. #4182 ()
  • Added docs for a group of undocumented functions. #4168 ()
  • ARM build fixes. #4210 #4291 () (proller)
  • Dictionary tests now able to run from ctest. (proller)
  • Now /etc/ssl is used as default directory with SSL certificates. (alexey-milovidov)
  • Added checking SSE and AVX instruction at start. (Igr)
  • Init script will wait server until start. (proller)

Backward Incompatible Changes

  • Removed allow_experimental_low_cardinality_type setting. LowCardinality data types are production ready. #4323 ()
  • Reduce mark cache size and uncompressed cache size accordingly to available memory amount. #4240 (
  • Added keyword INDEX in CREATE TABLE query. A column with name index must be quoted with backticks or double quotes: `index` . #4143 ()
  • sumMap now promote result type instead of overflow. The old sumMap behavior can be obtained by using sumMapWithOverflow function. #4151 ()

Performance Improvements

  • std::sort replaced by pdqsort for queries without LIMIT. (Evgenii Pravda)
  • Now server reuse threads from global thread pool. This affects performance in some corner cases. (alexey-milovidov)

Improvements

  • Implemented AIO support for FreeBSD. #4305 ()
  • SELECT * FROM a JOIN b USING a, b now return a and b columns only from the left table. #4141 ()
  • Allow -C option of client to work as -c option. #4232 ()
  • Now option --password used without value requires password from stdin. #4230 ()
  • Added highlighting of unescaped metacharacters in string literals that contain LIKE expressions or regexps. #4327 ()
  • Added cancelling of HTTP read only queries if client socket goes away. #4213 ()
  • Now server reports progress to keep client connections alive. #4215 ()
  • Slightly better message with reason for OPTIMIZE query with optimize_throw_if_noop setting enabled. #4294 ()
  • Added support of --version option for clickhouse server. #4251 ()
  • Added --help/-h option to clickhouse-server. #4233 ()
  • Added support for scalar subqueries with aggregate function state result. #4348 ()
  • Improved server shutdown time and ALTERs waiting time. #4372 ()
  • Added info about the replicated_can_become_leader setting to system.replicas and add logging if the replica won’t try to become leader. #4379 ()

ClickHouse Release 19.1

ClickHouse Release 19.1.14, 2019-03-14

  • Fixed error Column ... queried more than once that may happen if the setting asterisk_left_columns_only is set to 1 in case of using GLOBAL JOIN with SELECT * (rare case). The issue does not exist in 19.3 and newer. 6bac7d8d ()

ClickHouse Release 19.1.13, 2019-03-12

ClickHouse Release 19.1.10, 2019-03-03

This release contains exactly the same set of patches as 19.3.6.

ClickHouse Release 19.1

ClickHouse Release 19.1.9, 2019-02-21

Bug Fixes

  • Fixed backward incompatibility with old versions due to wrong implementation of send_logs_level setting. (alexey-milovidov)
  • Fixed backward incompatibility of table function remote introduced with column comments. (alexey-milovidov)

ClickHouse Release 19.1.8, 2019-02-16

Bug Fixes

  • Fix install package with missing /etc/clickhouse-server/config.xml. (proller)

ClickHouse Release 19.1

ClickHouse Release 19.1.7, 2019-02-15

Bug Fixes

  • Correctly return the right type and properly handle locks in joinGet function. #4153 ()
  • Fixed error when system logs are tried to create again at server shutdown. #4254 ()
  • Fixed error: if there is a database with Dictionary engine, all dictionaries forced to load at server startup, and if there is a dictionary with ClickHouse source from localhost, the dictionary cannot load. #4255 ()
  • Fixed a bug when the execution of mutations containing IN operators was producing incorrect results. #4099 ()
  • clickhouse-client can segfault on exit while loading data for command line suggestions if it was run in interactive mode. #4317 ()
  • Fixed race condition when selecting from system.tables may give table does not exist error. #4313 ()
  • Fixed deadlock when SELECT from a table with File engine was retried after No such file or directory error. #4161 ()
  • Fixed an issue: local ClickHouse dictionaries are loaded via TCP, but should load within process. #4166 ()
  • Fixed No message received error when interacting with PostgreSQL ODBC Driver through TLS connection. Also fixes segfault when using MySQL ODBC Driver. #4170 ()
  • Temporarily disable predicate optimization for ORDER BY. #3890 ()
  • Fixed infinite loop when selecting from table function numbers(0). #4280 ()
  • Fixed compile_expressions bug with comparison of big (more than int16) dates. #4341 ()
  • Fixed segmentation fault with uncompressed_cache=1 and exception with wrong uncompressed size. #4186 ()
  • Fixed ALL JOIN with duplicates in right table. #4184 ()
  • Fixed wrong behaviour when doing INSERT ... SELECT ... FROM file(...) query and file has CSVWithNames or TSVWIthNames format and the first data row is missing. #4297 ()
  • Fixed aggregate functions execution with Array(LowCardinality) arguments. #4055 ()
  • Debian package: correct /etc/clickhouse-server/preprocessed link according to config. #4205 ()
  • Fixed fuzz test under undefined behavior sanitizer: added parameter type check for quantile*Weighted family of functions. #4145 ()
  • Make START REPLICATED SENDS command start replicated sends. #4229 ()
  • Fixed Not found column for duplicate columns in JOIN ON section. #4279 ()
  • Now /etc/ssl is used as default directory with SSL certificates. #4167 ()
  • Fixed crash on dictionary reload if dictionary not available. #4188 ()
  • Fixed bug with incorrect Date and DateTime comparison. #4237 ()
  • Fixed incorrect result when Date and DateTime arguments are used in branches of conditional operator (function if). Added generic case for function if. #4243 ()

ClickHouse Release 19.1.6, 2019-01-24

New Features

  • Custom per column compression codecs for tables. #3899 (alesapin, , Anatoly)
  • Added compression codec Delta. (alesapin)
  • Allow to ALTER compression codecs. (alesapin)
  • Added functions left, right, trim, ltrim, rtrim, timestampadd, timestampsub for SQL standard compatibility. (Ivan Blinkov)
  • Support for write in HDFS tables and hdfs table function. (alesapin)
  • Added functions to search for multiple constant strings from big haystack: multiPosition, multiSearch ,firstMatch also with -UTF8, -CaseInsensitive, and -CaseInsensitiveUTF8 variants. (Danila Kutenin)
  • Pruning of unused shards if SELECT query filters by sharding key (setting optimize_skip_unused_shards). (Gleb Kanterov, )
  • Allow Kafka engine to ignore some number of parsing errors per block. #4094 ()
  • Added support for CatBoost multiclass models evaluation. Function modelEvaluate returns tuple with per-class raw predictions for multiclass models. libcatboostmodel.so should be built with #607. (KochetovNicolai)
  • Added functions filesystemAvailable, filesystemFree, filesystemCapacity. (Boris Granveaud)
  • Added hashing functions xxHash64 and xxHash32. (filimonov)
  • Added gccMurmurHash hashing function (GCC flavoured Murmur hash) which uses the same hash seed as #4000 ()
  • Added hashing functions javaHash, hiveHash. #3811 ()
  • Added table function remoteSecure. Function works as remote, but uses secure connection. #4088 ()

Experimental Features

  • Added multiple JOINs emulation (allow_experimental_multiple_joins_emulation setting). (Artem Zuikov)

Bug Fixes

  • Make compiled_expression_cache_size setting limited by default to lower memory consumption. #4041 ()
  • Fix a bug that led to hangups in threads that perform ALTERs of Replicated tables and in the thread that updates configuration from ZooKeeper. #2947 #3934 ()
  • Fixed a race condition when executing a distributed ALTER task. The race condition led to more than one replica trying to execute the task and all replicas except one failing with a ZooKeeper error. #3904 ()
  • Fix a bug when from_zk config elements weren’t refreshed after a request to ZooKeeper timed out. #2947 (Alex Zatelepin)
  • Fix bug with wrong prefix for IPv4 subnet masks. (alesapin)
  • Fixed crash (std::terminate) in rare cases when a new thread cannot be created due to exhausted resources. (alexey-milovidov)
  • Fix bug when in remote table function execution when wrong restrictions were used for in getStructureOfRemoteTable. (alesapin)
  • Fix a leak of netlink sockets. They were placed in a pool where they were never deleted and new sockets were created at the start of a new thread when all current sockets were in use. (Alex Zatelepin)
  • Fix bug with closing /proc/self/fd directory earlier than all fds were read from /proc after forking odbc-bridge subprocess. (alesapin)
  • Fixed String to UInt monotonic conversion in case of usage String in primary key. (Winter Zhang)
  • Fixed error in calculation of integer conversion function monotonicity. (alexey-milovidov)
  • Fixed segfault in arrayEnumerateUniq, arrayEnumerateDense functions in case of some invalid arguments. (alexey-milovidov)
  • Fix UB in StorageMerge. (Amos Bird)
  • Fixed segfault in functions addDays, subtractDays. (alexey-milovidov)
  • Fixed error: functions round, floor, trunc, ceil may return bogus result when executed on integer argument and large negative scale. (alexey-milovidov)
  • Fixed a bug induced by ‘kill query sync’ which leads to a core dump. (muVulDeePecker)
  • Fix bug with long delay after empty replication queue. #3932 ()
  • Fixed excessive memory usage in case of inserting into table with LowCardinality primary key. #3955 ()
  • Fixed LowCardinality serialization for Native format in case of empty arrays. #3907 (KochetovNicolai)
  • Fixed incorrect result while using distinct by single LowCardinality numeric column. #4012 ()
  • Fixed specialized aggregation with LowCardinality key (in case when compile setting is enabled). #3886 ()
  • Fix user and password forwarding for replicated tables queries. #3957 () (小路)
  • Fixed very rare race condition that can happen when listing tables in Dictionary database while reloading dictionaries. (alexey-milovidov)
  • Fixed incorrect result when HAVING was used with ROLLUP or CUBE. #3837 ()
  • Fixed column aliases for query with JOIN ON syntax and distributed tables. #3980 ()
  • Fixed error in internal implementation of quantileTDigest (found by Artem Vakhrushev). This error never happens in ClickHouse and was relevant only for those who use ClickHouse codebase as a library directly. #3935 ()

Improvements

  • Support for IF NOT EXISTS in ALTER TABLE ADD COLUMN statements along with IF EXISTS in DROP/MODIFY/CLEAR/COMMENT COLUMN. (Boris Granveaud)
  • Function parseDateTimeBestEffort: support for formats DD.MM.YYYY, DD.MM.YY, DD-MM-YYYY, DD-Mon-YYYY, DD/Month/YYYY and similar. (alexey-milovidov)
  • CapnProtoInputStream now support jagged structures. (Odin Hultgren Van Der Horst)
  • Usability improvement: added a check that server process is started from the data directory’s owner. Do not allow to start server from root if the data belongs to non-root user. (sergey-v-galtsev)
  • Better logic of checking required columns during analysis of queries with JOINs. (Artem Zuikov)
  • Decreased the number of connections in case of large number of Distributed tables in a single server. (Winter Zhang)
  • Supported totals row for WITH TOTALS query for ODBC driver. (Maksim Koritckiy)
  • Allowed to use Enums as integers inside if function. (Ivan)
  • Added low_cardinality_allow_in_native_format setting. If disabled, do not use LowCadrinality type in Native format. (KochetovNicolai)
  • Removed some redundant objects from compiled expressions cache to lower memory usage. (alesapin)
  • Add check that SET send_logs_level = 'value' query accept appropriate value. (Sabyanin Maxim)
  • Fixed data type check in type conversion functions. (Winter Zhang)

Performance Improvements

  • Add a MergeTree setting use_minimalistic_part_header_in_zookeeper. If enabled, Replicated tables will store compact part metadata in a single part znode. This can dramatically reduce ZooKeeper snapshot size (especially if the tables have a lot of columns). Note that after enabling this setting you will not be able to downgrade to a version that does not support it. #3960 ()
  • Add an DFA-based implementation for functions sequenceMatch and sequenceCount in case pattern does not contain time. #4004 ()
  • Performance improvement for integer numbers serialization. #3968 ()
  • Zero left padding PODArray so that -1 element is always valid and zeroed. It’s used for branchless calculation of offsets. #3920 ()
  • Reverted jemalloc version which lead to performance degradation. #4018 ()

Backward Incompatible Changes

  • Removed undocumented feature ALTER MODIFY PRIMARY KEY because it was superseded by the ALTER MODIFY ORDER BY command. (Alex Zatelepin)
  • Removed function shardByHash. (alexey-milovidov)
  • Forbid using scalar subqueries with result of type AggregateFunction. (Ivan)

Build/Testing/Packaging Improvements

  • Added support for PowerPC (ppc64le) build. #4132 ()
  • Stateful functional tests are run on public available dataset. #3969 ()
  • Fixed error when the server cannot start with the bash: /usr/bin/clickhouse-extract-from-config: Operation not permitted message within Docker or systemd-nspawn. #4136 ()
  • Updated rdkafka library to v1.0.0-RC5. Used cppkafka instead of raw C interface. #4025 ()
  • Updated mariadb-client library. Fixed one of issues found by UBSan. #3924 ()
  • Some fixes for UBSan builds. #3926 #3948 ()
  • Added per-commit runs of tests with UBSan build.
  • Added per-commit runs of PVS-Studio static analyzer.
  • Fixed bugs found by PVS-Studio. #4013 ()
  • Fixed glibc compatibility issues. #4100 ()
  • Move Docker images to 18.10 and add compatibility file for glibc >= 2.28 #3965 ()
  • Add env variable if user do not want to chown directories in server Docker image. #3967 ()
  • Enabled most of the warnings from -Weverything in clang. Enabled -Wpedantic. #3986 ()
  • Added a few more warnings that are available only in clang 8. #3993 ()
  • Link to libLLVM rather than to individual LLVM libs when using shared linking. #3989 ()
  • Added sanitizer variables for test images. #4072 ()
  • clickhouse-server debian package will recommend libcap2-bin package to use setcap tool for setting capabilities. This is optional. #4093 ()
  • Improved compilation time, fixed includes. #3898 ()
  • Added performance tests for hash functions. #3918 ()
  • Fixed cyclic library dependences. #3958 ()
  • Improved compilation with low available memory. #4030 ()
  • Added test script to reproduce performance degradation in . #4036 ()
  • Fixed typos in comments. #4089 ()