Project: ClickHouse (App Definition and Development / Database)
File: v21.10.1.8013-prestable.md

sidebar_position: 1 sidebar_label: 2022 Fix the issue that in case of some sophisticated query with column aliases identical to the names of expressions, bad cast may happen. This fixes . This fixes . This fix may introduce backward incompatibility: if there are different expressions with identical names, exception will be thrown. It may break some rare cases when `enableoptimizepredicate_expression` is set. (). Do not output trailing zeros in text representation of `Decimal` types. Example: `1.23` will be printed instead of `1.230000` for decimal with scale 6. This closes . It may introduce slight incompatibility if your applications somehow relied on the trailing zeros. Serialization in output formats can be controlled with the setting `outputformatdecimaltrailingzeros`. Implementation of `toString` and casting to String is changed unconditionally. (). Now MergeTreeSettings `replicatedmaxparallelsends`, `replicatedmaxparallelsendsfortable`, `replicatedmaxparallelfetches`, `replicatedmaxparallelfetchesfortable` do nothing. They never worked well and were replaced with `maxreplicatedfetchesnetworkbandwidth`, `maxreplicatedsendsnetworkbandwidth` and `backgroundfetchespool_size`. (). Generate a unique server uuid when server starts. (). Added new commands BACKUP and RESTORE. (). Partitioned write into s3 table function. (). Implementation of short circuit function evaluation, closes . Add settings `shortcircuitfunction_evaluation` to configure short circuit function evaluation. (). Add feature for creating user-defined functions. (). Add support for INTERSECT, EXCEPT, ANY, ALL operators. (). IDisk interface to store data on web server of static files. Closes . (). Introduce lz4 compression for import / export. (). Support the case when the data is enclosed in array in JSONAsString input format. Closes . (). Add new column `lastqueueupdate_exception` to `system.replicas` table. (). ALTER TABLE ... MATERIALIZE COLUMN. (). - Add replicated storage of user, roles, row policies, quotas and settings profiles through ZooKeeper (experimental). (). Allow positional arguments under setting `enablepositionalarguments`. Closes . (). Added ComplexKeyRangeHashed dictionary. Closes . (). add conversion functions between snowflake id and dateTime(dateTime64) Close . (). Add feature for creating user-defined functions as lambda expressions. Syntax `CREATE FUNCTION {functionname} as ({parameters}) -> {function core}`. Example `CREATE FUNCTION plusone as (a) -> a + 1`. Authors @Realist007. (). Add `getServerPort` function to allow getting server port. When the port is not used by the server, throw an exception. (). Accept user settings related to file formats in `SETTINGS` clause in `CREATE` query. This closes . (). Add a system table of table_views, convenient to query the dependency relationship between tables and views. (). Added `executable` storage engine and table function. Authors @ruct. (). Added `ExecutablePool` storage. (). Introducing two checks in `sequenceMatch` and `sequenceCount` that allow for early exit when some deterministic part of the sequence pattern is missing from the events list. This change unlocks many queries that would previously fail due to reaching operations cap, and generally speeds up the pipeline. (). Make `hasAll` filter condition leverage bloom filter data-skipping indexes. (). Speed up sumIf and countIf aggregation functions. (). Enhance primary key analysis with always monotonic information of binary functions, notably non-zero constant division. (). Create virtual projection for `minmax` indices. Now, when `allowexperimentalprojectionoptimization ` is enabled, queries will use minmax index instead of reading a part when possible. (). improve Materialize TTL by recalculating

only without actual ttl action. (). Improved the existence condition judgment and empty string node judgment when clickhouse-keeper creates znode. (). Don't silently ignore errors and don't count delays in `ReadBufferFromS3`. (). Add `logqueriesprobability` setting that allows user to write to query_log only a sample of queries. Closes . (). Disable arrayJoin on partition expressions. (). - Add `FROM INFILE` command. (). Enables query parameters to be passed in the body of http requests. (). Remove duplicate index analysis and avoid possible invalid limit checks during projection analysis. (). Add aggregate function `quantileBFloat16Weighted` similarly to other quantile...Weighted functions. This closes . (). Now `ALTER MODIFY COLUM` DataType to `Nullable(DataType)` doesn't require mutation. (). Allow symlinks for library dictionaty path. (). Add function `SHA512`. (). Use Multipart copy upload for large S3 objects. (). Improve remote query cancelation (in case of remote server abnormaly terminated). (). Enable tcpkeepalive_timeout by default. (). Fix incorrect assertion during writing to StorageKafka. (). Support lambda argument for APPLY column transformer which allows applying functions with more than one argument. This is for . (). Add interactive documentation in `clickhouse-client` about how to reset the password. This is useful in scenario when user has installed ClickHouse, set up the password and instantly forget it. See . (). Allow to create dictionaries with empty attributes list. (). Added `replicationwaitforinactivereplicatimeout` setting. It allows to specify how long to wait for inactive replicas to execute `ALTER`/`OPTIMZE`/`TRUNCATE` query (default is 120 seconds). If `replicationalterpartitionssync` is 2 and some replicas are not active for more than `replicationwaitforinactivereplica_timeout` seconds, then `UNFINISHED` will be thrown. (). Add a setting `emptyresultforaggregationbyconstantkeysonempty_set` to control the behavior of grouping by constant keys on empty set. This is to bring back the old baviour of . (). Lower restrictions for Enum data type to allow attaching compatible data. Closes . (). Support ON CONFLICT clause when inserting into PostgreSQL table engine or table function. Closes . (). Support implicit conversions between index in operator ` (). Enable optimizedistributedgroupbysharding_key by default. (). Fix `zookeeperlog.address` (before the first patch in this PR the address was always `::`) and reduce number of calls `getpeername(2)` for this column (since each time entry for `zookeeperlog` is added `getpeername()` is called, cache this address in the zookeeper client to avoid this). (). Fix removing of parts in a Temporary state which can lead to an unexpected exception (`Part %name% doesn't exist`). Fixes . (). Added libhdfs3conf in server config instead of export env LIBHDFS3CONF in clickhouse-server.service. (). Use real tmp file instead of predefined "rows_sources" for vertical merges. This avoids generating garbage directories in tmp disks. (). Speed up data parts loading by delaying table startup process. (). Allow ssl connection for RabbitMQ engine. (). Fix removing of parts in a Temporary state (follow up for ). (). Do not allow creating StorageMaterializedPostgreSQL with bad arguments. Closes . (). Introduce `connectionwaittimeout` (default to 5 seconds, 0 - do not wait) setting for MySQL engine. (). Fix strange sessions expiration logic in Keeper. Probably it should help in CI: https://clickhouse-test-reports.s3.yandex.net/0/6bd9b82141c98dcd7796fd9d08326831095ba519/stresstest(debug).html#fail1. (). To be

Closes . (). Bugfix for windowFunnel's "strict" mode. This fixes . (). - Fix bug with aliased column in `Distributed` table. (). Fixed another case of `Unexpected merged part ... intersecting drop range ...` error. (). Fix bad type cast when functions like `arrayHas` are applied to arrays of LowCardinality of Nullable of different non-numeric types like `DateTime` and `DateTime64`. In previous versions bad cast occurs. In new version it will lead to exception. This closes . (). Fix column filtering with union distinct in subquery. Closes . (). After https://github.com/ClickHouse/ClickHouse/pull/26384. To execute `GRANT WITH REPLACE OPTION` now the current user should have `GRANT OPTION` for access rights it's going to grant AND for access rights it's going to revoke. (). After https://github.com/ClickHouse/ClickHouse/pull/25687. Add backquotes for the default database shown in CREATE USER. (). Remove duplicated source files in CMakeLists.txt in arrow-cmake. (). Fix possible crash when asynchronous connection draining is enabled and hedged connection is disabled. (). Prevent crashes for some formats when NULL (tombstone) message was coming from Kafka. Closes . (). Fix a rare bug in `DROP PART` which can lead to the error `Unexpected merged part intersects drop range`. (). Fix a couple of bugs that may cause replicas to diverge. (). After https://github.com/ClickHouse/ClickHouse/pull/26864. Fix shutdown of `NamedSessionStorage`: session contexts stored in `NamedSessionStorage` are now destroyed before destroying the global context. (). Fix PostgreSQL-style cast (`::` operator) with negative numbers. (). Fix selecting with extremes from a column of the type `LowCardinality(UUID)`. (). Check cluster name before creating Distributed table, do not allow to create a table with incorrect cluster name. Fixes . (). Fix checking access grants when executing GRANT WITH REPLACE statement with ON CLUSTER clause. This PR improves fix https://github.com/ClickHouse/ClickHouse/pull/27701. (). Fix cases, when read buffer fails with 'attempt to read after end of file'. Closes . (). Enable Thread Fuzzer in Stress Test. Thread Fuzzer is ClickHouse feature that allows to test more permutations of thread scheduling and discover more potential issues. This closes . This closes . This closes . This closes . (). Add support for build with `clang-13`. This closes . (). Improve support for build with `clang-13`. (). Temporarily switched ubuntu apt repository to mirror ru.archive.ubuntu.com as default one(archive.ubuntu.com) is not responding from our CI. (). Print out git status information at CMake configure stage. (). Add new log level `<test>` for testing environments. (). Fix handling null value with type of Nullable(String) in function JSONExtract. This fixes and . This was introduced in https://github.com/ClickHouse/ClickHouse/pull/25452 . (). Fix extremely rare segfaults on shutdown due to incorrect order of context/config reloader shutdown. (). Fixed possible excessive number of conditions moved from `WHERE` to `PREWHERE` (optimization controlled by settings `optimizemoveto_prewhere`). (). Fix bug in clickhouse-keeper which can lead to endless logs when `rotatelogsinterval` decreased. (). Multiple small fixes for projections. See detailed description in pr. (). Fix incorrect behavior in `clickhouse-keeper` when list watches (`getChildren`) triggered with `set` requests for children. (). Fix a rare bug in `clickhouse-keeper` when the client can receive a watch response before request-response.

Fix possible read of uninitialized memory for queries with `Nullable(LowCardinality)` type and extremes. Fixes . (). Fix reading of custom TLD w/o new line at EOF. (). Fix inconsistent result in queries with `ORDER BY` and `Merge` tables with enabled setting `optimizereadin_order`. (). Fix intersecting parts due to new part had been replaced with an empty part. (). Fix NOT-IN index optimization when not all key columns are used. This fixes . (). Fix non joined rows from nullable column. Close . (). Fix rare case when changes of `clickhouse-keeper` settings may lead to lost logs and server hung. (). Fix lack of quotes for table names in MaterializedPostgreSQL engine. Closes . (). Fixed possible ZooKeeper watches leak on background processing of distributed DDL queue. Closes . (). Fix bug which can lead to error `Existing table metadata in ZooKeeper differs in sorting key expression.` after alter of `ReplicatedVersionedCollapsingMergeTree`. Fixes . (). Fix `There is no subcolumn` error, while select from tables, which have `Nested` columns and scalar columns with dot in name and the same prefix as `Nested` (e.g. `n.id UInt32, n.arr1 Array(UInt64), n.arr2 Array(UInt64)`). (). Fix UUID overlap in DROP TABLE for internal DDL from MaterializeMySQL. (). Fix endless loop for truncated bzip2 archive. (). NO CL ENTRY: 'Add executable table function'. (). NO CL ENTRY: 'DOCSUP-12413: macros support in functions cluster and clusterAllReplicas'. (). NO CL ENTRY: 'Revert "less sys calls #2: make vdso work again"'. (). NO CL ENTRY: 'Revert "Do not miss exceptions from the ThreadPool"'. (). NO CL ENTRY: 'Revert "Improve 01730distributedgroupbynomergeorderbylong"'. (). NO CL ENTRY: 'Revert "Revert "less sys calls #2: make vdso work again""'. (). NO CL ENTRY: 'Update src/Functions/GatherUtils/Sources.h'. (). NO CL ENTRY: 'Revert "Add test for "'. (). NO CL ENTRY: 'fix minor typo'. (). Experiment with asynchronous readers (). Introduce sessions (). FILTER clause for aggregate functions (). Add test for parsing maps with integer keys (). S3 disk unstable reads test (). Refactor NotJoined (). Accept error code by error name in client test hints (). Break some tests (). Remove the remains of ANTLR in the tests (). Disable memory tracking for roaring bitmaps on Mac OS (). Use only SSE2 in "unbundled" build (). Remove trash (). Fix stress test in `~CompressedWriteBuffer` (). Mark tests for `DatabaseReplicated` as green (). Removed DenseHashMap, DenseHashSet (). Map data type parsing tests (). Refactor arrayJoin check on partition expressions (). Fix test 01014lazydatabaseconcurrentrecreatereattachandshowtables (). Better code around decompression (). Disable jemalloc under OSX (). try to collect some core dumps in perf tests (). Fix jemalloc under osx (zone_register() had been optimized out again) (). Merging (). Fix intersect/except with limit (). Add HTTP string parsing test (). Fix some tests (). Set function divide as suitable for short-circuit in case of Nullable(Decimal) (). Remove unnecessary files (). Revert "Mark tests for `DatabaseReplicated` as green" (). Remove hardening for watches in DDLWorker (). Stateless test: Cleanup leftovers (). Dictionaries key types refactoring (). Update 01822shortcircuit.reference (after merging ) (). Proper shutdown global context

01766todatetime64notimezonearg: Use a date without timezone changes (). Use sessions more (). Add test for clickhouse-keeper start after conversion (). Fix setting name "allowexperimentaldatabasematerializedpostgresql" in the error message (). Fix bug in short-circuit found by fuzzer (). Add more checks for LC in native protocol. (). Fix test 00443preferredblocksizebytes.sh (). Mute some integration tests until failures are fixed (). Fix bad cast in insertPostgreSQLValue (). Add fuzzers for codecs (). Remove tmp folders from tests (). blog article about perf tests (). make the sql-standard window functions case insensitive (). Bump librdkafka (fixes use of an invalid/destroyed mutex) (). fix decimal formatting settings in perf test (). Add separate constants for interfaces LOCAL and TCP_INTERSERVER. (). Build fuzzers with clang-tidy (). Allow implicit cast bool to Field (). Improve server logs checking in integration tests (). Get rid of mutable value in FunctionGetSetting. (). Disable fuzzers build with clang-tidy (). Build fuzzers in CI (). Fix file progress for local (). Update libunwind (). Fix style typos (). Fix throw without exception in MySQL source. (). Fix race between REPLACE PARTITION and MOVE PARTITION (). Follow-up to (). Bump replxx (). Add test for (). Set version of tzlocal to 2.1 (). Fix zookeeper secure client test (). Fix typo in docs (). Fixed a typo in comments to `SinkToStorage` (). Use jinja template tests in fuzzer (). Clickhouse-keeper: renames and comments (). Update nanodbc (). Improve 01730distributedgroupbynomergeorderbylong (). Get rid of useless projection columns during merge (). Fix style (). Fix clickhouse keeper jepsen tests (). Updated ya.make files (). Better detection of the default interface in replicated fetches tests (). Reserve protocol number for ALTER PRIMARY KEY. (). Maybe fix livelock in ZooKeeper client (). Guard UDF container with a lock (). Fix error codes (). CHJIT custom memory manager (). Dictionaries small fixes (). Better nullable primary key implementation (). ODBC connection holder fix dangling reference (). test/stress: fix patterns for filtering out Raft messages (). Rename system.views columns (). Try to fix arcadia build (generate ya.make) (). Try to fix arcadia build (). Fix teststorages3/testputgetwithglobs (cleanup after test) (). Fix sed argument in test/fuzzer/run-fuzzer.sh (). Another try to fix BackgroundPoolTask decrement. (). Rework kafka topic creation. (). Add compat between SinkToStorage and BlockOutputStream (). Try to fix arcadia build (generate ya.make) (). Add a test for a friend (). Update ya.make (). Fix disk with static files a little (). More accurate check that zk root exists. (). Merging (). Fix 01457createastablefunction_structure (). Remove some rename tests (). Fix race in UDF (follow up) (). Executable multiple pipes added test (). UserDefinedFunctionFactory added comments (). BorrowedObjectPool fix style (). Add test for keeper 2 node configuration (). Function dictGet default implementation for nulls (). Fix race in zlib (). Bump poco to remove getpid() calls (). Fix broken kafka test (). Fix format names in docs (). Fix wrong header of minmax_count projection (). remove recursion in ZstdInflatingReadBuffer (). Improve (). Function dictGet small fix (). Fix arcadia build (). Add missed log level into TextLog (). Revert (). Revert ().