Documentation Index
Fetch the complete documentation index at: https://private-7c7dfe99-page-updates.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Backward Incompatible Changes
Query and syntax changes
- Fixed inconsistent query formatting caused by incorrect alias substitution. Note: when the analyzer is disabled, certain
CREATE VIEWqueries that useINwith an alias reference may no longer be processed. To avoid this, ensure the analyzer is enabled (it has been enabled by default since 24.3). #82838 (Alexey Milovidov). - An empty column list in
JOIN USING ()is now a syntax error. Previously, this was reported asINVALID_JOIN_ON_EXPRESSIONat query execution time, and in some cases (such as joining withJoinstorage) could cause aLOGICAL_ERROR. #92371 (Vladimir Cherkasov). - Subqueries are no longer allowed in
ORDER BYand other table key expressions. #96847 (Alexey Milovidov).
Data type changes
- Added support for
Nullable(Tuple). To enable it, setallow_experimental_nullable_tuple_type = 1. #89643 (Nihal Z. Miaji). - Advanced shared data for the JSON type is now enabled by default. Downgrading to versions earlier than 25.8 will not be possible, as older versions cannot read data parts written with the new JSON format. For safe upgrades, set the
compatibilitysetting to the previous version, or set MergeTree settingsdynamic_serialization_version='v2'andobject_serialization_version='v2'. #92511 (Pavel Kruglov). SKIP REGEXPin the JSON type now uses partial matching by default. #92847 (Pavel Kruglov).- Fixed a logical error that occurred on
Varianttype mismatch. #95811 (Bharat Nallan). DATEcolumns from PostgreSQL are now inferred asDate32in ClickHouse (previously they were inferred asDate, which could overflow for values outside its narrow range). InsertingDate32values back to PostgreSQL is also now supported. #95999 (Alexey Milovidov).
Storage and index changes
- Improved the storage layout of the inverted text index for more efficient reads from object storage, along with better merge performance for tables with inverted text indexes. If you used the experimental text index before version 25.12, you must drop the index before upgrading and rebuild it on the new version. #91518 (Anton Popov).
- The storage format for statistics has changed — all statistics are now stored in a single file. #93414 (Anton Popov).
- Index filenames are now escaped to prevent broken parts. ClickHouse will fail to load indices with non-ASCII characters in their name that were created by previous versions. To handle this, use the MergeTree setting
escape_index_filenames. #94079 (Raúl Marín).
Removed features
- The
DEFLATE_QPLandZSTD_QATcodecs have been removed. Convert any existing data compressed with these codecs to another codec before upgrading. Note that using these codecs previously required enablingenable_deflate_qpl_codecorenable_zstd_qat_codec. #92150 (Robert Schulze). INSERTinto simpleALIAScolumns is no longer supported (reverts #84154). This feature did not work with custom formats and was not guarded by a setting. #92849 (Azat Khuzhin).- The
Lazydatabase engine has been removed and is no longer available. #93627 (Alexey Milovidov). - The
transposed_with_wide_viewmode ofmetric_loghas been removed due to a bug that made it unusable. It is no longer possible to definesystem.metric_logwith this mode. #93867 (Alexey Milovidov).
Settings and configuration changes
- A new setting now throws an error if a data lake catalog does not have access to object storage. #93606 (Konstantin Vedernikov).
- CPU scheduling for workloads is now preemptive by default. See the
cpu_slot_preemptionserver setting. #94060 (Sergei Trifonov). - The settings
exact_rows_before_limit,rows_before_aggregation,cross_to_inner_join_rewrite,regexp_dict_allow_hyperscan,regexp_dict_flag_case_insensitive,regexp_dict_flag_dotall, anddictionary_use_async_executorhave been reclassified from format settings to regular settings. This is mostly an internal change with no user-visible side effects, unless you specified any of these in an Iceberg, DeltaLake, Kafka, S3, S3Queue, Azure, Hive, RabbitMQ, Set, FileLog, or NATS table engine definition — in which case, such definitions will now throw an error instead of silently ignoring them. #94106 (Robert Schulze). - The semantics of
do_not_merge_across_partitions_select_finalhave been simplified. Previously, the feature could be automatically enabled even when not explicitly set, which caused confusion and production issues. Now: setting it to1enables the functionality unconditionally, and setting it to0defers to the new settingenable_automatic_decision_for_merging_across_partitions_for_final(default1). #96110 (Nikita Taranov). - Added S3 schema validation. #96194 (Konstantin Vedernikov).
- The
apply_row_policy_after_finalsetting is now enabled by default, ensuring thatROW POLICYrespectsFINALas it did originally. If you previously relied onoptimize_move_to_prewhere_if_final=1to apply row policies beforeFINAL, useapply_row_policy_after_final=0instead. #97279 (Nikolai Kochetov).
Security and access control changes
joinGet/joinGetOrNullnow enforceSELECTprivileges on the underlying Join table. ExecutingjoinGet('db.table', 'column', key)requiresSELECTprivilege on both the key columns and the attribute column being retrieved. Queries without these privileges will fail withACCESS_DENIED. To migrate, grant permissions usingGRANT SELECT ON db.join_table TO userfor full table access, orGRANT SELECT(key_col, attr_col) ON db.join_table TO userfor column-level access. #94307 (Vladimir Cherkasov).CREATE TABLE ... AS ...queries now requireSHOW COLUMNSprivilege instead ofSHOW TABLES, which was previously checked incorrectly. #94556 (pufit).
Insert and deduplication changes
- Deduplication is now enabled by default for all inserts. Previously it was off for async inserts and materialized views, but on for sync inserts. To preserve the old behavior, explicitly set
deduplicate_insert='backward_compatible_choice'(and similarly fordeduplicate_blocks_in_dependent_materialized_views). #95970 (Sema Checherinda).
System table changes
- S3Queue and AzureQueue in-memory metadata is now limited. The system tables have been renamed:
system.s3queueis nowsystem.s3queue_metadata_cache, andsystem.azure_queueis nowsystem.azure_queue_metadata_cache. #95809 (Kseniia Sumarokova).
Other breaking changes
- Fixed h3 index functions that could crash or hang when called with invalid inputs. #93657 (Michael Kolupaev).
New Features
Authentication
- Added support for time-based one-time password (TOTP) as an authentication method. #71273 (Vladimir Cherkasov).
Functions
- Added
reverseBySeparatorfunction, which reverses the order of substrings in a string separated by a specified separator. #91780 (Xuewei Wang). - Added
colorOKLABToSRGBandcolorSRGBToOKLABfunctions to convert between sRGB and OKLAB color spaces. #93361 (Pranav Tiwari). - Added
cosineDistanceTransposedfunction that approximates the cosine distance between two points. #93621 (Raufs Dunamalijevs). - Added
xxh3_128hashing function. #96055 (Raúl Marín). - Added
mergeTreeAnalyzeIndex()function for analyzing MergeTree index usage. #92954 (Azat Khuzhin). - Functions now support the
Varianttype via the newFunctionVariantAdaptor. #90900 (Bharat Nallan). - Certain functions can now be called without parentheses in SQL. #94678 (Aly Kafoury).
System tables
- Added
system.user_defined_functionstable to monitor UDF loading status and configuration. #90340 (Xu Jia). - Added
system.zookeeper_infotable. #90809 (Smita Kulkarni). - Added
system.primestable andprimestable function containing prime numbers in ascending order. #92776 (Nihal Z. Miaji). - Added
filescolumn tosystem.partsshowing the number of files in each data part. #94337 (Match). - Added
system.fail_pointstable to inspect existing failpoints and whether they are enabled. #96762 (Pedro Ferreira).
Table engines and storage
- Added text index support for
Arraycolumns. #89895 (Jimmy Aguilar Mena). - Added support for the Paimon REST catalog. #92011 (JIaQi Tang).
- Added
icebergLocalClustertable function. #93323 (Anton Ivashkin). - Added
lazy_load_tablesdatabase setting. When enabled, tables are not loaded during database startup — a lightweightStorageTableProxyis created instead and the real table engine is materialized on first access. #96283 (xiaohuanlin). - Added support for auxiliary ZooKeeper for
DatabaseReplicated. #91683 (RinChanNOW). - Data and system files in cache can now be split into separate segments. #87834 (MikhailBurdukov).
- Added a new SLRU cache for Parquet metadata to improve read performance by avoiding redundant file downloads. The cache can be dropped with
SYSTEM DROP PARQUET METADATA CACHE. #89750 (Grant Holly). - Data lake tables now support
PREWHEREand multistagePREWHEREin the Parquet reader v3. #93542 (Konstantin Vedernikov). - Added distributed index analysis across multiple replicas, beneficial for shared storage and large data volumes. #86786 (Azat Khuzhin).
Insert and deduplication
- Async insert deduplication now works with dependent materialized views. When a
block_idcollision occurs, the original block is filtered to remove rows associated with the collidingblock_id, and the remaining rows are transformed through all relevant materialized view queries. #89140 (Sema Checherinda). - Async inserts now support parallel quorum — inserted data is replicated to the quorum, and if duplicates are found, the query waits until previously inserted data is replicated as well. #93356 (Sema Checherinda).
- Added
insert_deduplication_versionserver setting to enable migration to a unified deduplication hash. #95409 (Sema Checherinda). - Started migration of deduplication hashes. #97562 (Sema Checherinda).
SQL and query features
- Added
SYSTEM CLEAR [...] CACHEsyntax as a clearer alternative to the existingSYSTEM DROP [...] CACHE. The old syntax remains available. #93727 (Pranav Tiwari). - Added
OPTIMIZE <table> DRY RUN PARTS <part names>query to simulate merges without committing the result part. Useful for verifying merge correctness, reproducing merge-related bugs, and benchmarking merge performance. #96122 (Anton Popov). - DDL queries with
ON CLUSTERcan now be executed for Replicated databases when theignore_on_cluster_for_replicated_databasesetting is enabled. The cluster name will be ignored. #92872 (Kirill). - Introduced a new syntax and framework to simplify and extend the projection index feature. #91844 (Amos Bird).
Settings and configuration
- Added
max_insert_block_size_bytessetting for finer control over the formation of inserted blocks. #92833 (Kirill Kopnev). - Added
use_primary_keysetting. Set it tofalseto disable granule pruning based on the primary key. #93319 (Nihal Z. Miaji). - Added
default_dictionary_databasesetting, which lets ClickHouse resolve external dictionaries referenced without a database qualifier in a specified default database. This simplifies migration from XML-defined global dictionaries to SQL-defined per-database dictionaries. #91412 (Dmitrii Plotnikov). - Added
check_named_collection_dependenciessetting (enabled by default) to prevent dropping named collections that are used by tables. #96181 (Pablo Marcos). - Added a max-min fair scheduler for concurrency control, providing better fairness under high oversubscription where many queries compete for limited CPU slots. The
concurrent_threads_schedulerserver setting now defaults tomax_min_fairinstead offair_round_robin, so short-running queries are no longer penalized by long-running ones. #94732 #95300 (Sergei Trifonov). - Added
logger.startup_console_levelandlogger.shutdown_console_levelconfiguration options to override the console log level during ClickHouse startup and shutdown respectively. #95919 (Garrett Thomas).
Monitoring
- Added a
ClickHouse_Infometric to the Prometheus/metricsendpoint containing version information, making it possible to build charts tracking detailed version information over time. #91125 (Christoph Wurm).
Experimental Features
- Vector search can now distribute the load across replicas in a cluster, enabling support for large vector indexes that exceed the memory capacity of a single VM. #95876 (Shankar Iyer).
- Added a server-side AST fuzzer controlled by the
ast_fuzzer_runsandast_fuzzer_any_querysettings. When enabled, the server runs randomized mutations of each query after its normal execution, discarding the results. #97568 (Alexey Milovidov).
Improvements
Query and SQL
- Correlated subqueries now support more table engines and data source kinds. #90175 (Dmitry Novik).
- Non-constant
INis now supported for scalars (e.g.val1 NOT IN if(cond, val2, val3)). #93495 (Yarik Briukhovetskyi). - Added support for extended table aliases for JOINs (e.g.
SELECT * FROM (SELECT 1) AS t(a) JOIN (SELECT 1) AS u(b) ON a = b). #95331 (Yarik Briukhovetskyi). EXPLAIN indices = 1is now supported as an alias forEXPLAIN indexes = 1. #92774 (Pranav Tiwari).- Improved filter pushdown for
numbersandprimestable functions — ClickHouse can now derive conservative value bounds fromWHEREconditions to restrict sequence generation, avoiding unbounded scans. #96115 (Nihal Z. Miaji). - Equivalent sets optimization now works across multiple consecutive
INNER JOINoperations, so filters applied to any table in the chain are automatically pushed down to all related tables. #96596 (Vladimir Cherkasov). - Automatic cluster table functions are now used for single subqueries in
FROM. #96332 (phulv94). - The primary key index is now used when filtering with
startsWithUTF8if the prefix contains only ASCII characters. #97055 (vkcku). assumeNotNull,coalesce, andifNullnow enable primary key and skip index pruning for range predicates when key columns are wrapped in these functions. #94754 (Nihal Z. Miaji).- Unused columns are now also removed from the reading step when reading from MergeTree, which is especially useful when a filter is pushed down into
PREWHERE. #89982 (János Benjamin Antal). - The
use_join_disjunctions_push_downoptimization is now enabled by default. #89313 (Alexey Milovidov). - The
enable_join_runtime_filtersoptimization is now enabled by default. #89314 (Alexey Milovidov). - JOIN runtime filter overhead is now reduced by automatically disabling filters when too many bits are set in the bloom filter or too few rows are filtered out. #91578 (Alexander Gololobov).
- Added
use_hash_table_stats_for_join_reorderingsetting (enabled by default) to control whether runtime hash table size statistics are used for join reordering. #93912 (Vladimir Cherkasov). - Index analysis is now performed only once regardless of whether the query executes locally or with parallel replicas. #94854 (Nikita Taranov).
- If a skip index in a
FINALquery is on a column that is part of the primary key, the additional primary key intersection check in other parts is now skipped. #93899 (Shankar Iyer). DROP DATABASEnow drops tables in reverse dependency order, improving crash-safety when the database contains tables with loading dependencies. #97057 (Alexey Milovidov).- Synchronous waiting for mutations now respects query cancellation and time limits. #96756 (Alexey Milovidov).
- Prevented resurrection of dropped data if
ADD COLUMNis run quickly after aDROP COLUMNmutation. #96713 (Alexey Milovidov). - Conflicting
ALTERexpressions withUPDATEandRENAME COLUMNnow throw a proper exception instead of a logical error. #96022 (Alexey Milovidov). - Estimated total row count and NDV (number of distinct values) statistics are now collected for aggregation key columns. #92812 (Alexander Gololobov).
- All replicas can now steal orphaned ranges in parallel replicas reading, improving load balancing and reducing long-tail latency. #91374 (zoomxi).
- Improved estimation accuracy for automatic parallel replicas with highly selective
PREWHEREfilters. #97231 (Nikita Taranov). joinGetnow supports temporary tables. #92973 (Eduard Karacharov).- External aggregation, sorting, and join now respect the
temporary_files_codecquery setting in all contexts. #92388 (Vladimir Cherkasov). - Vector similarity search plan optimizations are now only applied when an index exists for the search column. #94998 (Eduard Karacharov).
Table engines and storage
StorageEmbeddedRocksDBnow supports multiple columns as a primary key. #33917 (usurai).- Added
ALTER TABLE <table> ATTACH PART <part_name> FROM <directory_name>syntax, allowing attachment of parts from arbitrary subdirectories ofdetached/(e.g. parts withbroken-on-startorunexpectedprefixes) without manual filesystem renaming. #74816 (Anton Popov). min_free_disk_bytes_to_perform_insertnow works correctly with JBOD volumes. #90878 (Aleksandr Musorin).max_parts_to_merge_at_onceis now respected during TTL drop-part merges. #95315 (Kseniia Sumarokova).- Background operations (mutate, merge) can now be configured independently via a
backgroundprofile, rather than sharing settings with regular queries via thedefaultprofile. #93905 (Arsen Muk). - Improved subcolumn reading with correct size calculation, reducing memory usage and improving speed. #96251 (Pavel Kruglov).
- Limited the number of pipeline streams generated with
split_intersecting_parts_ranges_into_layersto avoid excessive memory consumption. #96478 (Nikita Taranov). - The text index is now GA. #96794 (Robert Schulze).
QBitis now GA. #95358 (Raufs Dunamalijevs).QBitcan now be compared for equality. #94078 (Raufs Dunamalijevs).- When saving table schema with
enable_positional_arguments_for_projections, expressions are now substituted instead of positional arguments, allowing server restart with the setting disabled. #96372 (Alexey Milovidov). - In Replicated databases, the cached cluster is no longer updated for every dummy query. #96897 (Tuan Pham Anh).
- Added
SYSTEM RESET DDL WORKER [ON CLUSTER]query to reset the DDLWorker state, useful for refreshing replica activity when host IDs are updated. #93780 (Tuan Pham Anh).
Data lakes
- Added DeltaLake deletion vector support. #93852 (Kseniia Sumarokova).
- Deletion vectors are now also supported for
deltaLakeCluster. #94365 (Kseniia Sumarokova). - DeltaLake is now available on macOS. #95985 (Alexey Milovidov).
- DeltaLake now takes
count()results from metadata and shows correct table stats (total bytes/rows) insystem.tables. #96190 (Kseniia Sumarokova). - Skipped object storage reads when querying DeltaLake tables from
system.tables. #95899 (Antonio Andelic). - Added
SYSTEM RELOAD DELTA KERNEL TRACING <level>command for debugging delta-kernel logging. #96763 (Kseniia Sumarokova). - Iceberg table metadata location is now deduced automatically if
metadata_locationis not specified in Glue metadata. #91994 (Andrey Zvonov). - Iceberg manifest file entries now parse lower and upper bounds for position delete file names, improving data file selection. #93980 (Daniil Ivanik).
- Enabled
PREWHEREoptimization for Iceberg tables. #95476 (Konstantin Vedernikov). - Thread and memory limits are now shared between data file and position delete file readers in Iceberg tables. #94701 (Yang Jiang).
- Added support for
ALTER TABLE RENAME COLUMNfor Iceberg tables. #97455 (murphy-4o). - Added Google Cloud Storage support for data lakes. #93866 (Konstantin Vedernikov).
- S3 access tokens are now dynamically refreshed during long queries with Unity Catalog. #95069 (Konstantin Vedernikov).
- Added role-based access to Glue catalog via
aws_role_arnandaws_role_session_namesettings. #90825 (Antonio Andelic).
S3Queue
- S3Queue now tracks hive partitioning in ordered mode. #81040 (Anton Ivashkin).
- Refactored S3Queue ordered mode processing with buckets, reducing the number of Keeper requests and improving performance. #92889 (Kseniia Sumarokova).
- Added more generic partitioning support for S3Queue ordered mode. #94321 (Bharat Nallan).
- Added bucketing based on partition key for S3Queue in ordered mode. #94698 (Bharat Nallan).
- S3Queue auxiliary ZooKeeper support via the
keeper_pathsetting. #95203 (Diego Nieto). - S3(Azure)Queue ordered mode now cleans up failed nodes by tracking limits. #94412 (Kseniia Sumarokova).
S3 and object storage
- S3
x-amz-server-side-encryptionheaders are no longer propagated toHeadObject,UploadPart, andCompleteMultipartUploadrequests. #64577 (Francisco J. Jurado Moreno). storage_class_namecan now be specified in named collections for the S3 table engine ands3table function. #91926 (János Benjamin Antal).- Fixed EC2 metadata endpoint throttling when running many concurrent S3 queries with instance profile credentials — the credentials provider is now cached and shared across all queries. #92891 (Sav).
- Added MinIO compatibility support to the AWS S3 C++ SDK with error code mapping for MinIO-specific errors, improving reliability for self-hosted MinIO clusters. #93082 (XiaoBinMu).
- Improved S3 authentication error messages with hints to check credentials. #95648 (Gerald Latkovic).
- Azure Blob Storage now falls back to read-write copy when native copy fails with any error (previously only on Unauthorized). #92888 (Smita Kulkarni).
Functions
avg()now supportsDate,DateTime, andTimevalues as arguments. #87845 (Yarik Briukhovetskyi).mapContainsKeyLikeandmapContainsValueLikecan now leverage a text index onmapKeys()ormapValues(). #93049 (Michael Jarrett).flipCoordinatesnow supports theGeometrytype. #93303 (Bharat Nallan).- Removed the 64-token limit for
hasAnyTokensandhasAllTokensfunctions. #95152 (Elmi Ahmadov). - Added
distanceCosineas an alias forcosineDistance, consistent with other distance functions. #96065 (Raufs Dunamalijevs). - Added
iiffunction to ClickHouse KQL. #94790 (happyso). use_variant_as_common_typeis now enabled by default, allowing incompatible types insideArray,UNIONqueries, andif/multiIf/casebranches. #90677 (Alexey Milovidov).
Settings and configuration
use_skip_indexes_on_data_readis now enabled by default. #93407 (Shankar Iyer).- Added
add_minmax_index_for_time_columnssetting — when enabled, automatically creates minmax indexes for allDate,Date32,Time,Time64,DateTime, andDateTime64columns. #93355 (Michael Jarrett). - Added
materialize_statistics_on_mergesetting (default enabled) to control whether statistics are materialized during merges. #93379 (Han Fei). - Added
input_format_binary_max_type_complexitysetting to limit the total number of type nodes that can be decoded in binary format, preventing malicious payloads. #92519 (Raufs Dunamalijevs). - Added
trace_profile_events_listsetting to limit tracing withtrace_profile_eventto specific event names. #92298 (Alexey Milovidov). - Added
type_json_allow_duplicated_key_with_literal_and_nested_objectsetting to allow duplicated paths in JSON where one is a literal and another is a nested object, for backward compatibility with data created before path deduplication was enforced. #93604 (Pavel Kruglov). - Added
merge_max_dynamic_subcolumns_in_compact_partMergeTree setting andmax_dynamic_subcolumns_in_json_type_parsingquery-level setting to limit dynamic subcolumns in JSON columns during merge and parsing. #94184 (Pavel Kruglov). - Added
use_statisticsas an alias forallow_statistics_optimize, consistent withuse_primary_keyanduse_skip_indexes. #94366 (Robert Schulze). - Enabled
input_format_numbers_enum_on_conversion_errorfor Numbers-to-Enum conversion to check element existence. #94384 (Elmi Ahmadov). - Added a setting to throw an exception when a table has row policies but none apply to the current user, catching potential misconfigurations. #95014 (Vitaly Baranov).
enable_max_bytes_limit_for_min_age_to_force_mergeis now enabled by default for compatibility version 26.2 and higher. #95917 (Christoph Wurm).core_dump.size_limitis now hot-reloadable without server restart. #96524 (Miсhael Stetsyuk).- Command-line overrides are now respected when reloading configuration. #80295 (Alexey Milovidov).
- Added composite rotation strategy (size + time) for server logs. #87620 (Jianmei Zhang).
- Distributed index analysis can now be enabled based on part count (
distributed_index_analysis_min_parts_to_activate) and index size (distributed_index_analysis_min_indexes_size_to_activate). #95216 (Azat Khuzhin). - Statistics cache is now enabled by default with a 300-second update period. #95841 (Han Fei).
- The
pathconfiguration parameter is now resolved relative to the working directory at startup, preventing data directories from being placed in unusual locations. #96305 (Alexey Milovidov).
System tables and monitoring
- Added
parts_postpone_reasonscolumn tosystem.mutationsfor improved diagnostics. #92206 (Shaohua Wang). - Added
creation(implicit/explicit) column tosystem.data_skipping_indices. #92378 (Raúl Marín). - Running tasks are now reflected in
system.background_schedule_pooland the corresponding log table. #92587 (Azat Khuzhin). - Added
QueryNonInternalmetric to track the number of executing non-internal queries, helping monitor concurrency against themax_concurrent_querieslimit. #94284 (Ashwath Singh). - Added an asynchronous metric for the longest running merge elapsed time. #94825 (Raúl Marín).
- Added
connection_addressandconnection_porttoquery_logto reflect the physical connection (useful when connected through a proxy). #95471 (Yakov Olkhovskiy). - Added more information to
system.crash_log. #94112 (Miсhael Stetsyuk). - Added component name to
system.aggregated_zookeeper_log. #95882 (Antonio Andelic). - Added
system.tokenizerstable showing all available tokenizers. #96753 (Robert Schulze). - Added
system.jemalloc_statstable and/jemalloc.htmlHTTP endpoint for interactive visualization of jemalloc memory allocator statistics. #97077 (Antonio Andelic). - Added
system.jemalloc_profile_texttable for reading and analyzing jemalloc heap profiles, with support for raw, symbolized, and collapsed output formats. #97218 (Antonio Andelic). - Added
mutation_idstosystem.part_logforMUTATE_PARTandMUTATE_PART_STARTevents. #93811 (Shaohua Wang). - Nested global server settings (e.g.
logger.level) are now partially visible insystem.server_settings. #94001 (Hechem Selmi). view_duration_msnow shows the time a group was active, rather than the sum of thread durations. #94966 (Sema Checherinda).system.blob_storage_logis now available for Azure Blob Storage, Local, and HDFS. Addederror_codecolumn. #93105 (Alexey Milovidov).- Background tasks slower than average are now logged with a configurable threshold (
background_schedule_pool_log.duration_threshold_milliseconds, default 30ms). #92965 (Azat Khuzhin). - Passwords from URL storage are no longer shown in the query log. #93245 (Konstantin Vedernikov).
ClickHouse Keeper
- Correctly handles gaps in Keeper log entries if logs are before the last committed index. #90403 (Antonio Andelic).
- Added OpenTelemetry tracing for Keeper requests. #91332 (Miсhael Stetsyuk).
- Added new Keeper metrics:
KeeperChangelogWrittenBytes,KeeperChangelogFileSyncMicroseconds,KeeperSnapshotWrittenBytes,KeeperSnapshotFileSyncMicroseconds,KeeperBatchSizeElements, andKeeperBatchSizeBytes. #92149 (Miсhael Stetsyuk). CHECK_STATandTRY_REMOVEKeeper extensions are now enabled by default. #93886 (Mikhail Artemenko).- Keeper now throws an exception instead of aborting when it detects a broken snapshot or inconsistent changelogs, requiring manual intervention for safer recovery. #94168 (Antonio Andelic).
- Added
with_dataandwith_statextensions togetChildrenKeeper requests, allowing fetching children along with their data and stats in a single operation. #94826 (Nikolay Degterinsky). - Added a check for Keeper misconfiguration that could lead to cluster assembly failures. #94682 (Konstantin Bogdanov).
- Added
with_dataKeeper extension support to improve table fetching in Database Replicated. #96090 (Nikolay Degterinsky). - Auxiliary ZooKeeper can now be inserted into via
system.zookeeper. #92092 (RinChanNOW).
Memory management
- Optimized filesystem cache space reservation — eviction candidates are now collected without holding a unique lock. #82764 (Kseniia Sumarokova).
- Enabled parallelized reads in the filesystem cache read buffer for remote table engines/functions. #71781 (Kseniia Sumarokova).
- Reduced memory usage on non-Linux systems by enabling immediate purging of jemalloc dirty pages. #93360 (Eduard Karacharov).
- jemalloc dirty page purging now runs in a separate thread from the main MemoryWorker thread. Added
memory_worker_purge_total_memory_threshold_ratioconfig for purging based on total memory usage ratio. #94902 (Antonio Andelic). - jemalloc dirty page decay is now dynamically disabled when ClickHouse is under sustained memory pressure. #95145 (Antonio Andelic).
- Added an explicit memory consumption check before reading data from MergeTree, with lowered thread pool queue sizes based on production experience. #94692 (Nikita Mikhaylov).
- Total memory limit is now checked before user authentication, throwing
memory limit exceededif the limit is breached. #95003 (Nikolai Kochetov). - Fixed incorrect memory accounting for the query conditions cache. #95478 (Nikita Mikhaylov).
- Made query memory usage detection for spilling to disk during aggregation/sorting more robust. #92500 (Azat Khuzhin).
- The scheduler now prioritizes the MemoryWorker thread under CPU starvation to protect the process. #94864 (Nikita Mikhaylov).
- Fixed ClickHouse not respecting memory limits in some cases when reading from a table. #93715 (Nikita Mikhaylov).
Data formats
- Parquet reader now allows reading
TupleorMapcolumns as JSON. #92864 (Michael Kolupaev). - Parquet reader now supports empty tuples. #92868 (Michael Kolupaev).
- The
Datetype is now serialized as Arrow’s nativedate32type in Arrow/ArrowStream formats (previouslyuint16). The old behavior can be restored with theoutput_format_arrow_date_as_uint16setting. #96860 (Alexey Milovidov). - The
Hashoutput format is now independent of block sizes. #94503 (Alexey Milovidov). - Simple types in Pretty JSON format are no longer printed on separate lines. #93836 (Pavel Kruglov).
- Schema inference now respects
allow_experimental_nullable_tuple_type— when enabled, missing nested objects can becomeNULLinstead of a tuple ofNULLelements. #95525 (Nihal Z. Miaji). - The SQL formatter now outputs
COMMENTbeforeAS SELECTinstead of wrappingSELECTin parentheses. #96293 (Alexey Milovidov). - Optimized postings list compression with simdcomp. #92871 (Peng Jian).
Backup and restore
- Added
backup_data_from_refreshable_materialized_view_targetsbackup setting to control whether to back up data of refreshable materialized views. Targets of RMVs withAPPENDrefresh strategy are always backed up. #93658 (Julia Kartseva). - Added support for SQL-defined named collections in
BACKUP/RESTOREfor S3 and Azure Blob Storage. #94605 (Pablo Marcos).
Named collections and dictionaries
- Named collection parameter overrides are now allowed in the MongoDB table function. #89616 (vanchaklar).
- Enabled named collections for YTsaurus dictionaries and tables. #94582 (MikhailBurdukov).
- Column descriptions can now be passed for YTsaurus dynamic table dictionary sources. #92391 (MikhailBurdukov).
- Parameterized view schema is now shown when specified explicitly. #90220 (Grigorii Sokolik).
Deduplication
- Reworked the
insert_select_deduplicatesetting to add backward compatibility options. #92951 (Sema Checherinda). - Deduplication with async inserts is now allowed when materialized views are involved. #93957 (Sema Checherinda).
Other improvements
- Improved the UX of
SYSTEM INSTRUMENT ADD/REMOVE: string literals are now used for function names, all matching functions are patched, andfunction_nameis supported inREMOVE. #93345 (Pablo Marcos). - Added
SYSTEM NOTIFY FAILPOINTfor pausable failpoints andSYSTEM WAIT FAILPOINTfor PAUSE/RESUME. #92368 (Shaohua Wang). - C++ function names in
system.trace_log,system.symbols, and thedemanglefunction are now displayed correctly. #93075 (Alexey Milovidov). - jemalloc profiles are now written with symbols, eliminating the need for a binary during heap profile generation. #93099 (Azat Khuzhin).
- Fixed crash when attaching a table to a
MaterializedPostgreSQLdatabase ifdropReplicationSlotthrows during stack unwinding. #96871 (Alexey Milovidov). - Fixed leaving possible leftovers when
CREATE TABLEfails. #94174 (Azat Khuzhin). - Fixed uninitialized memory access when a password-protected TLS key is used. #94182 (Konstantin Bogdanov).
- When
alter table ... modify setting ...times out while acquiring a lock, it now returns a timeout error instead of a logical error. #93856 (Han Fei). - Improved CPU and real-time profiler interoperability with socket timeouts. #96601 (Sergei Trifonov).
- Enabled fast libcxx hardening for release builds (primarily out-of-bounds checks) with no noticeable performance impact. #94757 (Miсhael Stetsyuk).
Performance Improvements
JOIN performance
- Sped up some hash join operations by implementing dynamic dispatch for
ColumnVector::replicate. #79573 (Raúl Marín). - More filters are now pushed down into JOINs. #85556 (Nikita Taranov).
- Extended filter push-down from JOIN
ONconditions forANY,SEMI, andANTIjoins when the filter uses inputs from only one side. #92584 (Dmitry Novik). - Equivalent sets can now be used to push down filters for
SEMI JOIN. #92837 (Dmitry Novik). - Parallelized processing of non-joined rows in
ParallelHashJoinfor complex predicates, controlled by theparallel_non_joined_rows_processingsetting (enabled by default). #92068 (Yarik Briukhovetskyi). - Hash join now skips reading the left side entirely when the right side is empty, avoiding unnecessary work from heavy filtering or aggregation. #94062 (Alexander Gololobov).
- JOIN runtime filters are now supported for
RIGHT OUTERJOINs. #96183 (Hechem Selmi). - PREWHERE optimization is now postponed until after JOIN runtime filter optimization, allowing runtime filters to also be pushed to PREWHERE. #95838 (Alexander Gololobov).
Query optimization
- Disabled sort order optimization for window functions when the partition key matches or is a prefix of the sorting key, improving parallel execution performance. #87299 (Nikita Taranov).
- Outer filters are now pushed down into views, allowing PREWHERE to be applied on both local and remote nodes. #88316 (Igor Nikonov).
- Optimized performance and memory usage for fractional
LIMITandOFFSET. #91167 (Ahmed Gouda). - Constant filters on virtual columns are no longer evaluated redundantly. #91588 (c-end).
- Any deterministic expression in the primary key (e.g.
ORDER BY cityHash64(user_id)) can now be used for data skipping. ClickHouse applies the expression to query constants and uses the result for primary key index lookups with=,IN, andhas. For injective expressions, negated forms (!=,NOT IN,NOT has) are also supported. #92952 (Nihal Z. Miaji). - The read-in-order optimization now recognizes when
ORDER BYcolumns are constant due toWHEREconditions, enabling efficient reverse-order reads. This benefits multi-tenant queries likeWHERE tenant='42' ORDER BY tenant, event_time DESC. #94103 (matanper). - For
FINALqueries using a primary key condition followed by skip indexes, thePrimaryKeyExpandstep now only checks the initially shortlisted primary key ranges. #94903 (Shankar Iyer). - Lazy materialization optimization is now applied to all branches of a
UNION ALLquery, not just the first one, reducing I/O for queries that combine multiple sorted and limited reads from different MergeTree tables. #96832 (Federico Ginosa).
Function and aggregation performance
- JIT compilation now covers more functions. #88770 (Alexey Milovidov).
- Optimized
distinctJSONPathsaggregate function to read only JSON paths from data parts instead of the whole JSON column. #92196 (Pavel Kruglov). - Optimized
uniqExactwhen identical elements often come consecutively. #93268 (Alexey Milovidov). - Optimized
isValidASCIIfor all-ASCII input values. #93347 (Robert Schulze). - Sped up
uniqover numeric types by batching inserts when possible (not null, not-If, noGROUP BY, noIPv6orString). #95904 (Raúl Marín).
Storage and I/O performance
- Fixed Parquet Reader V3 Prefetcher to use faster random read logic. #91435 (Arsen Muk).
- Improved performance of
icebergCluster. #91537 (Yang Jiang). - Reduced INSERT and merge memory usage for very wide tables with Wide parts by enabling adaptive write buffers. Also added adaptive write buffer support for encrypted disks. #92250 (Azat Khuzhin).
- Improved full text search performance with the text index and
sparseGramstokenizer by reducing the number of tokens searched. #93078 (Anton Popov). - Sped up T64 codec compression using dynamic dispatch on x86. #95881 (Raúl Marín).
- Sped up LZ4 decompression of 32-byte blocks on x86. #96778 (Raúl Marín).
- Text index direct read optimization now works partially — parts with a materialized text index will use it, while parts without fall back to the original filter expression. #96411 (Anton Popov).
- Optimized minmax skip index computation during
INSERTby removing an unnecessary data copy and enabling vectorized min/max calculation for numeric columns. #97392 (Raúl Marín). - Added
minmaxsecondary indexes on time columns andbloom_filterindexes onquery_id/initial_query_idcolumns to system log tables for faster filtering. #96712 (Alexey Milovidov). - Avoided memory usage regression on
INSERTwhen deduplication is not enabled. #96503 (Alexey Milovidov).
Memory optimization
- Reduced memory footprint of
ASTLiteralby removing unused fields when highlighting andVALUESparsing are not active. #93974 (Ilya Yatsishin). - Introduced a specialized Enum AST class that stores value parameters as string/integer pairs instead of generic
ASTLiteralchildren, reducing memory consumption. #94178 (Ilya Yatsishin). - Optimized memory consumption of named tuple AST objects by storing column names as strings directly instead of in generic AST literal nodes. #94704 (Ilya Yatsishin).
- Reduced the size of the
CachedOnDiskReadBufferFromFilestructure by approximately 50x. #96098 (Azat Khuzhin). HashTable::resizeno longer copies old data when the table is empty. #96180 (Raúl Marín).
Internal optimizations
- Adopted the “fastrange” (Daniel Lemire) method for partitioning data inside the query pipeline, improving parallel sorting and JOINs. #93080 (Alexey Milovidov).
- Improved devirtualization with additional linker options. #94737 (Nikita Taranov).
- Improved clone replica performance for
ReplicatedMergeTreetables with many parts by batching ZooKeeper requests. #94847 (c-end). - Reduced ZooKeeper receive thread CPU consumption from
observeOperationsby over 20% by switching to faster hashing and lock-free counters. #95962 (Miсhael Stetsyuk).
Bug Fixes
All bug fixes (click to expand)
All bug fixes (click to expand)
JOIN fixes
- Fixed
INCOMPATIBLE_TYPE_OF_JOINerror for Join storage when outer-to-inner join optimization was applied. #84292 (Vladimir Cherkasov). - Fixed logical error for queries with multiple JOINs with
USINGclause andjoin_use_nulls. #92251 (Vladimir Cherkasov). - Fixed logical error during join reordering with
join_use_nulls. #92289 (Vladimir Cherkasov). - Fixed a possible crash with
join_on_disk_max_files_to_mergesetting. #92335 (Bharat Nallan). - Fixed
LOGICAL_ERRORcaused by unwanted modification of query plan when converting outer join to inner join. Also relaxed optimization requirements to apply when injective functions are used on aggregating keys during joins. #92503 (János Benjamin Antal). - Fixed logical error with multiple joins on constant condition and
join_use_nulls. #92892 (Vladimir Cherkasov). - Fixed
NULL != NULLcase forfull_sorting_joinonLowCardinality(Nullable(T))column. #92924 (Vladimir Cherkasov). - Fixed join results when the right-side join key was a sparse column. #93038 (Amos Bird).
- Fixed runtime filters working incorrectly when
LEFT ANTI JOINhad an extra post-condition. #91824 (Alexander Gololobov). - Fixed logical error when runtime filters were used in a query with totals for right-side table. #93330 (Alexander Gololobov).
- Fixed logical error in some cases triggered when join runtime filters were added to query plan due to incorrectly returned duplicated const columns. #93144 (Alexander Gololobov).
- Fixed
__applyFilterfunction used by join runtime filters returningILLEGAL_TYPE_OF_ARGUMENTin some valid cases. #93187 (Alexander Gololobov). - Fixed runtime filters not being added when joining with an already-filled right table. #93211 (Alexander Gololobov).
- Fixed
NOT_FOUND_COLUMN_IN_BLOCKerror when runtime filter was enabled and joined tables returned the same column multiple times. #93526 (Alexander Gololobov). - Fixed
FilterStepnot properly added when join runtime filter was applied overMergetable. #94021 (Alexander Gololobov). - Fixed type conversion to super type during join operation of
Joinstorage withUSINGclause. #94000 (Dmitry Novik). - Fixed queries with parallel replicas and JOIN with non-MergeTree table. #93902 (Igor Nikonov).
- Fixed race condition for Nullable join column in runtime filters. #95775 (Hechem Selmi).
- Fixed empty string becoming
NULLinJointable withNullable(String)key. #96002 (Alexey Milovidov). - Fixed
NOT_SUPPORTEDerror when usingdirectjoin algorithm with an empty MergeTree table. #95935 (Vladimir Cherkasov). - Fixed incorrect results from queries involving outer joins combined with multiple INNER JOINs due to illegal join reordering when an outer join’s
ONcondition referenced columns from multiple previously joined tables. #96193 (Vladimir Cherkasov). - Fixed runtime filter exception for Tuple columns with Nullable subfields. #96509 (Alexey Milovidov).
- Fixed queries with CROSS JOINs and enabled parallel replicas returning incorrect results. #96848 (Igor Nikonov).
- Fixed
arrayJoinproducing duplicate rows when used with INNER JOIN and WHERE clause, caused by partial predicate push-down incorrectly pushing filters containingarrayJoinbelow a JOIN. #96989 (Alexey Milovidov). - Fixed
LOGICAL_ERRORwhenarrayJoininWHEREclause referenced columns from both sides of a JOIN. #97239 (Alexey Milovidov). - Fixed logical error when using a matcher (
*) inside a lambda function within a VALUES clause in a JOIN with USING. #95661 (Vladimir Cherkasov). - Fixed possible logical error with matcher (
*,table.*) andanalyzer_compatibility_join_using_top_level_identifierwhenUSINGcolumn had different types. #95808 (Vladimir Cherkasov). - Fixed logical error with
analyzer_compatibility_join_using_top_level_identifierand ALIAS columns. #97297 (Vladimir Cherkasov). - Fixed crash in old analyzer when using JOIN with duplicated aliases. #96405 (Ilya Golshtein).
Query and analyzer fixes
- Fixed a bug where predefined query handlers had trailing whitespace interpreted as data during inserts. #83604 (Fabian Ponce).
- Fixed aggregation with projection producing an exception after metadata-only ALTERs such as extending Enum elements. #84143 (Alexey Milovidov).
- Fixed
count_distinct_optimizationpass over window functions and over multiple arguments. #92376 (Raúl Marín). - Fixed inconsistent AST formatting of
arrayElementwith negated literal. #92293 (Pavel Kruglov). - Fixed
NOT INwith non-constant array arguments returning wrong values. #93314 (Yarik Briukhovetskyi). - Fixed null-safe comparison error involving the
Nothingtype. #91884 (Yarik Briukhovetskyi). - Fixed
Not found columnerror foruse_top_k_dynamic_filteringoptimization. #93316 (Nikolai Kochetov). - Fixed unused columns removal from subqueries in the presence of a scalar correlated subquery. #93273 (Dmitry Novik).
- Fixed
optimize_inverse_dictionary_lookupnot working with distributed queries when key was a signed integral type. #93848 (Nihal Z. Miaji). - Fixed
lag/leadnot working with distributedremote()queries. #93858 (Nihal Z. Miaji). - Fixed bug in data skipping logic when
not match(...)was used inWHERE, causing incorrect results. #92726 (Nihal Z. Miaji). - Fixed bug in data skipping logic when
not materialize(...)ornot CAST(...)was used inWHERE, causing incorrect results. #93017 (Nihal Z. Miaji). - Fixed logical error during index analysis when an empty array was used in the
hasfunction. #92995 (Nihal Z. Miaji). - Fixed logical error in a rare case when an empty tuple was used with a
Mapcolumn. #93814 (Nihal Z. Miaji). - Fixed queries that used PK sharding with a false condition failing. #92815 (Yarik Briukhovetskyi).
- Fixed
Mergetable engine query planning throwingILLEGAL_COLUMNforhostName()when merging local and remote/Distributed tables. #93286 (Jinlin). - Fixed
NO_SUCH_COLUMN_IN_TABLEerror inMergeengine over tables with aliases. #92910 (Pavel Kruglov). - Fixed
SELECTquery with predicate on multiple columns with bloom filter skip indexes and bothORandNOTconditions returning inconsistent results. #94026 (Shankar Iyer). - Fixed applying projection when filter contained subcolumns. #93141 (Pavel Kruglov).
- Fixed
_part_offsetcorruption when projections were rebuilt during merges, and optimized projection processing by avoiding unnecessary reads. #93827 (Amos Bird). - Prevented different interpolated columns from collapsing into the same column in a block when they were effectively aliases of the same column. #93197 (Yakov Olkhovskiy).
- Removed unused columns when the projection was rebuilt during merge, reducing memory usage and creating fewer temporary parts. #93233 (Nikolai Kochetov).
- Fixed a logical error in some cases when negative
LIMIT/OFFSETwas used in distributed queries. #95357 (Nihal Z. Miaji). - Fixed a logical error in some cases when fractional
LIMIT/OFFSETwas used in distributed queries. #96475 (Nihal Z. Miaji). - Fixed
INfunction returning incorrect results withNULLvalues whentransform_null_inwas enabled. #95674 (Nihal Z. Miaji). - Fixed
IN (col)with a single column reference failing withUNSUPPORTED_METHODerror. #97646 (Alexey Milovidov). - Fixed
optimize_syntax_fuse_functionsrewritingsum/count/avgintosumCount()when the aggregate argument wasLowCardinality(Nullable). #96239 (Nihal Z. Miaji). - Fixed incorrect partition pruning for
not INandnot hasfunctions. #96241 (Nihal Z. Miaji). - Fixed prewhere filter error caused by lambda expressions in prewhere. #95395 (Xiaozhe Yu).
- Fixed
LOGICAL_ERRORin query analyzer when a lambda expression was passed where a concrete value was expected. #96892 (Alexey Milovidov). - Fixed null pointer dereference in certain expressions with lambda functions. #96479 (Alexey Milovidov).
- Fixed per-subquery
SETTINGSnot being applied to table functions likefilein CTEs and subqueries. #96882 (Alexey Milovidov). - Fixed query condition cache hash collision for CTE folded constants, which could lead to wrong query results. #96172 (Alexey Milovidov).
- Fixed
BAD_ARGUMENTSerror when querying tables with lambda expressions inside ALIAS columns through themerge()table function with the analyzer enabled. #97551 (Alexey Milovidov). - Fixed
EXCEPT ALLandINTERSECT ALLignoring row multiplicities and behaving like theirDISTINCTcounterparts. #96876 (Alexey Milovidov). - Fixed assertion failure in
WindowTransformwith a largePRECEDINGoffset. #96026 (Alexey Milovidov). - Fixed exception when using window functions with
group_by_use_nulls = 1andCUBE/ROLLUP/GROUPING SETS. #96878 (Alexey Milovidov). - Fixed interaction of
GROUPING SETS,group_by_use_nulls, andTuplewithLowCardinalityproducing unexpected block structure. #96358 (Alexey Milovidov). - Fixed logical error during
GROUP BY ... WITH ROLLUP/CUBEwhen keys includedLowCardinality(Nullable(...))insideNullable(Tuple(...)). #97647 (Alexey Milovidov). - Fixed assertion failure in
IfTransformStringsToEnumPasswhenifortransformreturnedNullable(String). #97002 (Alexey Milovidov). - Fixed
ACCESS_DENIEDfor users withoutCREATE TEMPORARY TABLEpermission whenoptimize_inverse_dictionary_lookuprewrotedictGet(...)predicates. #97484 (Nihal Z. Miaji). - Fixed
iffunction type mismatch betweenUInt64andInt32in an unusual case of distributed queries with PREWHERE and type inference. #96012 (Alexey Milovidov). - Fixed JIT-compiled queries involving
Booltypes. #96013 (Alexey Milovidov). - Fixed incorrect results when JIT-compiled expressions converted
DateTimetoDateTime64(e.g. inCASE/if/multiIfwith mixed DateTime types). #96879 (Alexey Milovidov). - Fixed use-of-uninitialized-value in
formatDateTimewith non-fixed-width formatters. #96133 (Alexey Milovidov). - Fixed
std::terminateinindexOfAssumeSortedwhen called with incompatible types. #96877 (Alexey Milovidov). - Geometry functions now accept individual geometry subtypes in addition to the
Geometryvariant type. #97571 (Alexey Milovidov). - Fixed cases where indexes affected results for queries with row policy/PREWHERE and FINAL. #97076 (Yarik Briukhovetskyi).
- Allowed read-in-order optimization to use row policies. #97538 (Janos Benjamin Antal).
- Fixed
LOGICAL_ERRORwhen using text-indexed columns withQUALIFYclause. #97313 (Alexey Milovidov). - Fixed a possible crash when the
WHEREclause had more than 32 expressions withAND/OR. #97698 (Shankar Iyer). - Fixed block structure mismatch in
removeUnusedColumnsoptimization when usingindexHintwith star expansion on tables withFINAL. #97622 (Alexey Milovidov). - Fixed AST formatting roundtrip inconsistency for aliased tuple literals inside parentheses. #97418 (Alexey Milovidov).
- Fixed AST formatting inconsistency for
NOT (1, 1, 1). #97653 (Alexey Milovidov).
MergeTree and storage fixes
- Always replaced file names with hashes in MergeTree if the filesystem is case insensitive. Previously on macOS it could lead to data corruption when column/subcolumn names differed only in case. #86559 (Pavel Kruglov).
- Materialized views now use the database where they were created as execution context, allowing omission of explicit database qualification in the view’s select query. #88193 (Dmitry Kovalev).
- Added full permissions check on the create stage for the underlying query inside a materialized view. #89180 (pufit).
- Fixed logical error when mutation without transaction mutated parts in an active transaction that was rolled back. #90469 (Shaohua Wang).
- Fixed
system.warningsnot updating correctly after an ordinary database was converted to an atomic database. #90473 (sdk2). - Fixed
LOGICAL_ERROR: Storage does not support transactionduringATTACH AS REPLICATED. #91772 (Shaohua Wang). - Fixed possible
FILE_DOESNT_EXISTerror after mutation of a sparse column withratio_of_defaults_for_sparse_serialization=0.0. #92860 (Pavel Kruglov). - Fixed possible
FILE_DOESNT_EXISTerror after sparse column mutation whenratio_of_defaults_for_sparse_serializationwas changed to1.0via alter. #93016 (Pavel Kruglov). - Fixed possible usage of outdated parts due to TOCTOU race for shared parts. #93022 (Azat Khuzhin).
- Inherited source part serialization info settings during mutation in MergeTree, fixing possible incorrect query results over mutated parts after data type serialization changes. #92419 (Pavel Kruglov).
- Fixed possible conflict between column and subcolumn with the same name leading to wrong serialization and query failures. #92453 (Pavel Kruglov).
- Fixed
NOT_FOUND_COLUMN_IN_BLOCKduring insert into a table with subcolumn in partition expression. #92905 (Pavel Kruglov). - Fixed possible missing subcolumn in MV during alter of source table. #93276 (Pavel Kruglov).
- Fixed
LOGICAL_ERRORwhen restoringReplicatedMergeTreewith deduplication race. #93612 (Pablo Marcos). - Fixed using sparse column for TTL update during direct deserialization, preventing
Unexpected type of result TTL columnerror. #93619 (Pavel Kruglov). - Restored
LowCardinalitywrappers on SET expression results if needed during TTL aggregation. #92971 (Seva Potapov). - Fixed
Cannot add action to empty ExpressionActionsChainforALTER TABLE REWRITE PARTS. #92754 (Azat Khuzhin). - Fixed query parameter substitution in
CREATE USERauthentication methods when usingON CLUSTER. #92777 (xiaohuanlin). - No longer attempts to delete temporary directories at startup if a MergeTree table is on a read-only disk. #92748 (Alexey Milovidov).
- Fixed materialization of skip indexes created on top of subcolumns. #93708 (Anton Popov).
- Fixed
CLEAR COLUMNwith dependent indices. #94057 (Raúl Marín). - Fixed attaching Replicated databases when the interserver host changed after restarting. #93779 (Tuan Pham Anh).
- Fixed logical error with
CREATE TABLE ... AS urlCluster()andReplicateddatabase engine. #92418 (Kseniia Sumarokova). - Fixed race condition between
REPLACE PARTITIONand background mutations that could result in both old and new data being visible. #96955 (Alexey Milovidov). - Fixed remaining race condition between
REPLACE PARTITIONand background mutations that could cause old data to reappear. #97105 (Alexey Milovidov). - Fixed stuck mutations when
PartCheckThreadre-enqueued aGET_PARTfor an already-mutated part. #97162 (Alexey Milovidov). - Fixed
ALTER TABLE DROP COLUMNfailing after a lightweight update was previously performed on the same column. #96861 (Anton Popov). - Fixed null pointer dereference when applying patch parts during lightweight updates. #97583 (Alexey Milovidov).
- Parts with unknown projections are no longer marked as lost forever. #95952 (Mikhail Artemenko).
- Fixed
CREATE TABLE ... CLONE AS ...ignoring the full qualifier of the source table. #96415 (Hasyimi Bahrudin). - Fixed implicit index regeneration in replicated tables during metadata changes. #96600 (Raúl Marín).
- Fixed implicit indices with alias columns and added full validation before creating them. #97115 (Raúl Marín).
- Fixed
min(timestamp)returning epoch (1970-01-01) via_minmax_count_projectionafter TTL merge when all rows were filtered out. #96703 (Raquel Barbadillo). - Fixed combination of
use_const_adaptive_granularityandindex_granularity_bytes(non-adaptive granularity) leading to miscalculation. #96143 (Alexey Milovidov). - Fixed
Number of rows in lazy chunk does not match number of offsetsexception when reading from tables with non-adaptive index granularity usingORDER BY ... LIMIT. #97270 (Alexey Milovidov). - Fixed regression in zero-copy replication where shared parts could be deleted before other replicas finished fetching them. #95597 (filimonov).
- Fixed
SYSTEM RESTART REPLICAlosing table from database when table re-creation failed with a non-ZooKeeper exception, causing metadata digest mismatches inDatabaseReplicated. #97276 (Alexey Milovidov). - Fixed
assert_castexception when building column statistics afterALTER TABLE MODIFY COLUMNchanged the column type. #97027 (Alexey Milovidov). - When a table has no statistics defined, ClickHouse no longer tries to load them, avoiding unnecessary overhead. #96233 (Han Fei).
- Fixed
There was an error: Cannot obtain error messagelogical error when waiting for a distributed DDL and dropping the Replicated database concurrently. #95664 (Alexander Tokmakov). - Fixed logical error in
KeyConditionwhen a table had a nullable primary key and the query usedcoalescewith a constant first argument. #96340 (Alexey Milovidov).
Data type and serialization fixes
- Fixed possible error during reading of size subcolumn from Dynamic/JSON types. #95573 (Pavel Kruglov).
- Fixed crash during
tupleElementapplied to arrays of JSON. #95647 (Pavel Kruglov). - Fixed executing
tupleElementon JSON with nested paths returning wrong results. #95907 (Pavel Kruglov). - Fixed
tupleElementthrowing an exception with JSON for paths with type hints. #97728 (Pavel Kruglov). - Fixed skipping paths in JSON data type — previously
JSON(SKIP path)would skip all keys with prefixpath(even keys likepathpath), which could lead to data loss. Now only the exact key is skipped. #95948 (Pavel Kruglov). - Fixed applying
type_json_allow_duplicated_key_with_literal_and_nested_objectto typed paths in JSON. #97422 (Pavel Kruglov). - Fixed incompatible typed paths check in JSON type. #92539 (Pavel Kruglov).
- Fixed creating type hint for path ‘skip’ in JSON. #92842 (Pavel Kruglov).
- Fixed dynamic subcolumns resolution in column aliases in analyzer. #92583 (Pavel Kruglov).
- Fixed
Nested columns sizes are inconsistent with local_discriminatorserror due to wrong in-place filtering optimization for Variant columns. #96410 (Alexey Milovidov). - Fixed crash in
ifNullwithVariantargument used inGROUP BY. #96790 (Alexey Milovidov). - Fixed logical error in
FunctionVariantAdaptorwith functions requiring const arguments likearrayROCAUC. #97116 (Bharat Nallan). - Fixed
LOGICAL_ERRORinFunctionVariantAdaptorwhen a function returnedNothingtype. #97213 (Alexey Milovidov). - Fixed logical exception when comparing NULL with a Variant column containing LowCardinality types. #97379 (Alexey Milovidov).
- Fixed
LOGICAL_ERRORinconcatwhen an argument contained aVarianttype withLowCardinalityinside. #97654 (Alexey Milovidov). - Fixed incorrect results when
LowCardinalitycolumns were converted toNullable. #96483 (Nihal Z. Miaji). - Correctly handled
LowCardinality Nullabletypes inCASTwhencast_keep_nullablewas enabled. #95747 (Alexey Milovidov). - Fixed
ColumnNullable is not compatible with originalexception when casting complex nested types. #96924 (Alexey Milovidov). - Fixed
LOGICAL_ERRORwhen usingisNull/isNotNullon subcolumns ofNullable(Tuple(... Nullable(T) ...))types. #97582 (Alexey Milovidov). - Fixed
LOGICAL_ERRORin Array-to-QBitconversion. #97413 (Alexey Milovidov). - Fixed
LOGICAL_ERRORwhen reading sparse column and its subcolumn together. #97515 (Pavel Kruglov). - Fixed
LOGICAL_ERRORwhen reading.sizesubcolumn of a sparseNullable(String)in a Tuple with PREWHERE. #97264 (Alexey Milovidov). - Fixed assertion failure in
SetandMergeTreeIndexSetwhen processing columns with inner sparse subcolumns. #97493 (Alexey Milovidov). - Fixed possible error
SIZES_OF_COLUMNS_DOESNT_MATCHduring sorting of empty tuple column. #92520 (Pavel Kruglov). - Fixed
DELTA_BYTE_ARRAYdecoding bugs in native Parquet reader affecting highly repetitive string data. #91929 (Daniel Muino). - Fixed assertion when reading from Parquet file when part of a prewhere expression was used elsewhere in the query. #90635 (Max Kainov).
- Fixed
LOGICAL_ERRORin Parquet V3 native reader when PREWHERE filter column contained non-boolean UInt8 values. #96594 (Alexey Milovidov). - Fixed Parquet schema inference in the old reader when a JSON column came after a Tuple column. #92867 (Michael Kolupaev).
- Fixed schema being cached for all files instead of only the inferred file during glob schema inference. #92006 (Pavel Kruglov).
- Fixed
ProtobufListformat reading from empty files and producing ghost records for empty tables. #96007 (Alexey Milovidov). - Fixed regression with the
Gorillacodec when an explicitly specified size did not correspond to the data type size. #96118 (Alexey Milovidov). - PostgreSQL engine can now correctly read
BOOLEAN[]. #96006 (Alexey Milovidov). - Fixed logical error when reading UUID column from SQLite TEXT column. #96016 (Alexey Milovidov).
- Fixed SQLite engine type conversion for
DateTime,Date,UUID, and other types. #96017 (Alexey Milovidov). - Fixed
FixedStringvalues being escaped incorrectly in queries to SQLite and PostgreSQL. #96019 (Alexey Milovidov). - Added
input_format_numbers_enum_on_conversion_errorsetting for conversion from Numbers to Enums. #56240 (Nikolay Degterinsky).
Text index and skip index fixes
- Creating and materializing text indexes on tables with parts over 4,294,967,295 rows is temporarily disabled to prevent incorrect query results. #92644 (Anton Popov).
- Fixed several crashes during merges of text indexes in MergeTree tables. #92925 (Anton Popov).
- Fixed merges of text indexes built on complex expressions (such as
concat(col1, col2)). #93073 (Anton Popov). - Fixed text index analysis on array columns when the index contained no tokens. #93457 (Anton Popov).
- Fixed rebuilding of text indexes created on top of subcolumns. #93326 (Anton Popov).
- Fixed direct reading from text index with duplicate search queries. #93516 (Anton Popov).
- Fixed inconsistencies in text index analysis for
has,mapContainsKey, andmapContainsValuefunctions that could return different results depending on whether a text index was used. #93578 (Anton Popov). - Fixed calculation of uncompressed sizes of text indexes in
system.parts. #92832 (Anton Popov). - Fixed
ngrambf_v1indexes with ngram length > 8 throwing an exception. #92672 (Robert Schulze). - Fixed
ngram_bfindex on non-UTF-8 data leading to uninitialized memory read. #93663 (Alexey Milovidov). - Fixed
stack-use-after-scopein the vector similarity index. #96259 (Alexey Milovidov). - Fixed logical error when a skip index expression produced a constant column. #96880 (Alexey Milovidov).
- Fixed creating a table with an empty expression
()as an index leading to invalid memory access. #96363 (Alexey Milovidov). - Fixed use-after-free in index analysis with disabled
use_primary_keyand a very large number of disjunctions. #96112 (Alexey Milovidov). - Fixed usage of primary index in lightweight updates with
INclause subqueries inWHERE. #92838 (Anton Popov). - Used proper error code when validating hypothesis index. #92559 (Raúl Marín).
Data lake fixes
- Fixed crash in single-node cluster when reading from Iceberg in split-by-buckets mode. #91553 (Konstantin Vedernikov).
- Fixed ORDER BY tuple in Iceberg. #93225 (Konstantin Vedernikov).
- Fixed Azure ADLS Gen2 vended credentials support in DataLakeCatalog — parse
adls.sas-token.*keys from Iceberg REST catalogs and fix ABFSS URL parsing. #93477 (Karun Anantharaman). - Replaced
DatewithDate32for Iceberg. #95322 (Konstantin Vedernikov). - Fixed crash on ORDER BY in Iceberg. #96484 (Konstantin Vedernikov).
- Fixed Iceberg partitioning. #96620 (Konstantin Vedernikov).
- Fixed incorrect bounds for data files when position delete reference was null in Iceberg manifest entries. #96061 (Daniil Ivanik).
- Added more validation checks for the root metadata file setting in Iceberg. #96754 (Daniil Ivanik).
- Credentials are no longer logged in Iceberg catalogs. #96831 (Konstantin Vedernikov).
- Fixed squashing partitioned Delta Lake data. #95773 (Kseniia Sumarokova).
- Fixed RESTful datalake catalog with invalid
auth_headerbreakingsystem.tables. #96680 (Han Fei).
S3/Azure/object storage fixes
- Fixed S3 table engine caching partition key when there were non-deterministic functions. #92844 (Miсhael Stetsyuk).
- Fixed assert in
ReadBufferFromS3which happened when cache was enabled. #93809 (Kseniia Sumarokova). - Fixed possible error in DiskObjectStorage cleanup thread. #87411 (Kseniia Sumarokova).
- Fixed possible deadlocks in
DiskObjectStorageTransaction. #93810 (Kseniia Sumarokova). - Fixed possible failures of DiskObjectStorage cleanup thread when many errors occurred. #94048 (Kseniia Sumarokova).
- Fixed data race in
copyS3Filefor multipart_tags. #97227 (Azat Khuzhin). - Running an invalid
ALTER UPDATEmutation on object storage file-like tables (S3, Azure) no longer caused a nullptr dereference. #96162 (Alexey Milovidov).
S3Queue fixes
- Fixed
Failed to set file processing within 100 retrieserror in S3Queue ordered mode (now a warning instead). #92814 (Kseniia Sumarokova). - Fixed bug with S3Queue setting
s3queue_migrate_old_metadata_to_buckets. #93232 (Kseniia Sumarokova). - Fixed metadata for S3Queue/AzureQueue engines. #90498 (Kseniia Sumarokova).
- Fixed a data race in S3Queue/AzureQueue storage. #95385 (Kseniia Sumarokova).
- Fixed deduplication for streaming from S3Queue/AzureQueue engine. #95467 (Kseniia Sumarokova).
Security and access control fixes
- Fixed missing access check in
SYSTEM SYNC FILE CACHE. #92372 (Kseniia Sumarokova). - Fixed incorrect logic in access grant checks for wildcard grants that was too restrictive. #92725 (pufit).
- Prevented users from getting the list of columns from a table without
SHOW COLUMNSpermission using themergetable engine. #93695 (János Benjamin Antal). - Fixed integer overflow vulnerability in
groupConcatstate deserialization that could cause memory safety issues. #93426 (Raufs Dunamalijevs). - Validated decompressed buffer size is as expected. #93690 (Raúl Marín).
- Fixed revoking default roles. #96103 (Vitaly Baranov).
- Fixed
AccessRights::containsreturning incorrect results with partial revokes. #96170 (pufit). - Fixed updating row policies assigned to the initial user in distributed queries. #95469 (Vitaly Baranov).
- The password argument of the
redistable function is now masked in logs and system tables. #95325 (Janos Benjamin Antal). - Fixed memory leak of BIO objects when reading X509 certificates. #96885 (Alexey Milovidov).
- Validated witness version in bech32 to avoid buffer overflow. #96671 (Raúl Marín).
- Fixed slow performance when querying system tables with a user that had limited grants on many databases. #95874 (pufit).
Backup and restore fixes
- Fixed the
Couldn't pack tar archive: Failed to write all byteserror caused by an incorrect archive entry size header. #92122 (Julia Kartseva). - Fixed server crash when many concurrent backups clashed over the same files. #93659 (Alexey Milovidov).
- Fixed stack overflow when creating archive-based backups (
.zip,.tzst) to aplain_rewritableobject storage disk. #96872 (Alexey Milovidov). - Fixed server crash when backup failed due to full disk or other I/O errors. #96873 (Alexey Milovidov).
- Fixed segfault in
StorageKeeperMapbackup due to use-after-free. #97336 (Alexey Milovidov).
Crash and stability fixes
- Fixed crash due to reading from a disconnected
Connection. #92807 (Raufs Dunamalijevs). - Fixed possible crash with
tokens()function with null second argument. #92586 (Raúl Marín). - Fixed server crash when
tokenswas called with non-const tokenizer parameters. #93383 (Robert Schulze). - Fixed potential crash from in-place mutation of underlying const PREWHERE columns during concurrent column shrinking or filtering. #92588 (Arsen Muk).
- Fixed possible hang on terminating background schedule pool, which could lead to server hangs on shutdown. #93008 (Azat Khuzhin).
- Fixed leaving connections in a broken state after preliminary cancellation of distributed queries. #93029 (Azat Khuzhin).
- Fixed possible
Cannot finalize buffer after cancellationinestimateCompressionRatio(). #93068 (Azat Khuzhin). - Ensured ZooKeeper is finalized on shutdown to fix possible hangs. #93602 (Azat Khuzhin).
- Fixed uncaught exception during background named collections reload with ZooKeeper storage. #92717 (Kseniia Sumarokova).
- Fixed use-of-uninitialized-value in
ReadWriteBufferFromHTTP. #94058 (Alexey Milovidov). - Fixed
TraceSenderbuffer size not being updated, causing interleaved flushes from different threads. #93966 (Miсhael Stetsyuk). - Stored storage shared pointers in
QueryPipelineto ensureIStorageobjects are not destroyed whilePipelineExecutoris alive. #93746 (Miсhael Stetsyuk). - Fixed possible crash for distributed queries in case of cancellation. #95466 (Aleksandr Musorin).
- Fixed crash on
DROP WORKLOADwhile running concurrently with queries. #95856 (Alexey Milovidov). - Fixed data race on
DROP WORKLOAD. #96614 (Sergei Trifonov). - Fixed several critical bugs around
ThreadPoolCallbackRunnerLocalusage. #95818 (Raúl Marín). - Fixed possible deadlock in
ProcessListdue to lock inversion when memory overcommit tracker triggered. #96182 (Antonio Andelic). - Fixed livelock in the cancellation checker thread for queries with high
max_execution_time. #96450 (Sergei Trifonov). - Fixed MemoryWorker purging thread being stuck due to a race condition. #96819 (Antonio Andelic).
- Fixed crash in
clearCachescaused by premature destruction of cached storage snapshots. #96995 (Alexey Milovidov). - Fixed
heap-use-after-freeinCREATE TABLEwith constraints. #96669 (Nikita Taranov). - Fixed possible use-after-free in
StorageKafka2. #97520 (Bharat Nallan). - Fixed data race on
shutdown_calledinDatabaseMaterializedPostgreSQL. #97554 (Alexey Milovidov). - Fixed race condition in sharded
HASHEDdictionary parallel loading that could cause some rows to not be loaded. #96953 (Alexey Milovidov). - Fixed deadlock in dictionaries when one dictionary referenced a Merge table that referenced it recursively. #96120 (Alexey Milovidov).
- Fixed
BaseSettings::readBinaryout-of-bounds access when a newer server sent an unknown setting during query plan deserialization. #97585 (Michael Stetsyuk). - Fixed crash when attaching a table to a
MaterializedPostgreSQLdatabase ifdropReplicationSlotthrew during stack unwinding. #96871 (Alexey Milovidov). - Released request stream in insert select to prevent closing HTTP connection. #92175 (Sema Checherinda).
- Fixed deadlock for
SHOW CREATE DATABASEfor Backup database. #92541 (Azat Khuzhin).
Other bug fixes
- Fixed
handleAllTokensempty array handling inhasAllTokensandhasAnyTokensfunctions. #93328 (Anton Popov). - Fixed period for global profilers — a truncated value was used instead of the set value, causing more frequent wakeups. #96048 (Antonio Andelic).
- Fixed
event_dateinsystem.asynchronous_metric_log. #95947 (Raúl Marín). - Fixed
system.functionsshowing empty string instead ofcategories = 'Internal'for internal functions. #97315 (Robert Schulze). - Fixed a possible logical error in
ip_triedictionary when key type was not String. #97555 (Bharat Nallan). - Fixed UDF debugging by enabling stderr capture in
system.query_log.exception. #92209 (Xu Jia). - Fixed
filterPartsByVirtualColumnsfor constant-false predicates. #97620 (Bharat Nallan). - Fixed
ColumnConstnot materialized before squashing. #97019 (Hasyimi Bahrudin).