ClickHouse的发版速度是众所周知的快
在最近,他们正式发出了18.12.13-2018-09-10版本
相关的CHANGELOG更是多的吓人
为了能够更好的使用新版特性,特做了详细的介绍其中新特性部分,为人工翻译、校对,毕竟这部分内容是重点,后面为Google翻译
新特性列表(按照GitHub中CHANGELOG顺序)
支持Decimal
- Added the DECIMAL(digits, scale) data type (Decimal32(scale), Decimal64(scale), Decimal128(scale)). To enable it, use the setting allow_experimental_decimal_type. #2846 #2970 #3008 #3047
|
|
新的WITH ROLLUP修饰符GROUP BY,替代语法 GROUP BY ROLLUP(…)
- New WITH ROLLUP modifier for GROUP BY (alternative syntax: GROUP BY ROLLUP(…)). #2948
JOIN查询会把*解析为字段
- In requests with JOIN, the star character expands to a list of columns in all tables, in compliance with the SQL standard. You can restore the old behavior by setting - asterisk_left_columns_only to 1 on the user configuration level. Winter Zhang
JOIN支持table functions(remote/merge/numbers/url)
- Added support for JOIN with table functions. Winter Zhang
终端支持tab自动补全
- Autocomplete by pressing Tab in clickhouse-client. Sergey Shcherbin
终端支持ctrl c取消输入
- Ctrl+C in clickhouse-client clears a query that was entered. #2877
可指定默认的JOIN行为
- Added the join_default_strictness setting (values: “, ‘any’, ‘all’). This allows you to not specify ANY or ALL for JOIN. #2982
server log关联查询ID
- Each line of the server log related to query processing shows the query ID. #2482
|
|
终端可以直接print日志
- Now you can get query execution logs in clickhouse-client (use the send_logs_level setting). With distributed query processing, logs are cascaded from all the servers. #2482
|
|
记录setting行为到query_log
- The system.query_log and system.processes (SHOW PROCESSLIST) tables now have information about all changed settings when you run a query (the nested structure of the Settings data). - Added the log_query_settings setting. #2482
|
|
记录线程数
- The system.query_log and system.processes tables now show information about the number of threads that are participating in query execution (see the thread_numbers column). #2482
|
|
增加进程统计信息
Added ProfileEvents counters that measure the time spent on reading and writing over the network and reading and writing to disk, the number of network errors, and the time spent - waiting when network bandwidth is limited. #2482
Added ProfileEventscounters that contain the system metrics from rusage (you can use them to get information about CPU usage in userspace and the kernel, page faults, and context -
switches), as well as taskstats metrics (use these to obtain information about I/O wait time, CPU wait time, and the amount of data read and recorded, both with and without page c ache). -#2482The ProfileEvents counters are applied globally and for each query, as well as for each query execution thread, which allows you to profile resource consumption by query in detail. #2482
|
|
新增每个查询执行线程的信息
- Added the system.query_thread_log table, which contains information about each query execution thread. Added the log_query_threads setting. #2482
|
|
新增 system.metrics and system.events
- The system.metrics and system.events tables now have built-in documentation. #3016
|
|
新增arrayEnumerateDense函数
- Added the arrayEnumerateDense function. Amos Bird
|
|
新增arrayCumSumNonNegativ/arrayDifference函数
Added the arrayCumSumNonNegative and arrayDifference functions. Aleksey Studnev
似乎还没上,无法使用。
新增retention函数
- Added the retention aggregate function. Sundy Li
|
|
states函数可以使用加号云算法
- Now you can add (merge) states of aggregate functions by using the plus operator, and multiply the states of aggregate functions by a nonnegative constant. #3062 #3034
|
|
虚拟列
- Tables in the MergeTree family now have the virtual column _partition_id. #3089
|
|
Bug修复:
- 修复了
Dictionary
表的问题(抛出Size of offsets doesn't match size of column
或Unknown compression method
异常)。此错误出现在版本18.10.3中。#2913 - 修复了合并
CollapsingMergeTree
表时如果其中一个数据部分为空(这些部分是在合并期间形成或者ALTER DELETE
所有数据都已删除)的错误,并且该vertical
算法用于合并。#3049 - 在修正了比赛条件
DROP
或TRUNCATE
用于Memory
与同时表SELECT
,这可能导致服务器崩溃。此错误出现在1.1.54388版本中。#3038 - 修复了在返回错误时插入
Replicated
表时数据丢失的可能性Session is expired
(可以通过ReplicatedDataLoss
度量检测到数据丢失)。版本1.1.54378中发生此错误。#2939 #2949 #2964 - 修复了一段时间内的段错误
JOIN ... ON
。#3000 - 修复了
WHERE
表达式完全由限定列名称组成时的错误搜索列名称,例如WHERE table.column
。#2994 - 修复了在执行分布式查询时发生的“未找到列”错误,如果从远程服务器请求包含带有子查询的IN表达式的单个列。#3087
- 修复了
Block structure mismatch in UNION stream: different number of columns
分布式查询发生的错误,如果其中一个分片是本地分区而另一个分片不是,并且PREWHERE
触发了移动优化。#2226 #3037 #3055 #3065 #3073 #3090 #3093 - 修复了
pointInPolygon
非凸多边形的某些情况的函数。#2910 - 修正了
nan
与整数比较时的错误结果。#3024 - 修复了
zlib-ng
库中可能导致段错误的错误。#2854 - 修复了插入带有
AggregateFunction
列的表时的内存泄漏,如果聚合函数的状态不简单(单独分配内存),以及单个插入请求是否导致多个小块。#3084 - 修复了同时创建和删除相同
Buffer
或MergeTree
表格时的竞争条件。 - 修复了比较由某些非平凡类型组成的元组(例如元组)时出现段错误的可能性。#2989
- 修复了运行某些
ON CLUSTER
查询时出现段错误的可能性。张冬 - 修复了数组元素
arrayDistinct
函数中的错误Nullable
。#2845 #2937 - 该
enable_optimize_predicate_expression
选项现在可以正确支持案例SELECT *
。张冬 - 修复了重新初始化ZooKeeper会话时的段错误。#2917
- 修复了使用ZooKeeper时潜在的阻塞问题。
- 修复了在a中添加嵌套数据结构的错误代码
SummingMergeTree
。 - 在为聚合函数的状态分配内存时,正确地考虑了对齐,这使得在实现聚合函数的状态时可以使用需要对齐的操作。晨星-XC
安全修复:
- 安全使用ODBC数据源。与ODBC驱动程序的交互使用单独的
clickhouse-odbc-bridge
进程。第三方ODBC驱动程序中的错误不再导致服务器稳定性或漏洞问题。#2828 #2879 #2886 #2893 #2921 - 修复了
catBoostPool
表函数中文件路径的错误验证问题。#2894 - 系统表(的内容
tables
,databases
,parts
,columns
,parts_columns
,merges
,mutations
,replicas
,和replication_queue
)根据用户的配置访问数据库过滤(allow_databases
)。张冬
向后不兼容的变化:
- 在使用JOIN的请求中,星形字符扩展为所有表中的列列表,符合SQL标准。您可以通过
asterisk_left_columns_only
在用户配置级别设置为1 来恢复旧行为。
构建更改:
- 现在大多数集成测试都可以通过提交来运行。
- 代码样式检查也可以通过提交运行。
- 在
memcpy
上CentOS7 / Fedora的建设时,实施正确选择。Etienne Champetier - 使用clang进行构建时,
-Weverything
除了常规警告外,还添加了一些警告-Wall-Wextra -Werror
。#2957 - 调试构建使用
jemalloc
调试选项。 - 用于与ZooKeeper交互的库的接口被声明为abstract。#2950
Reference
RPM-Download
其他
- 目前官方增加了很多针对问题排查以及性能监控相关的变量,相应的监控程序也需要升级了。
- 以clickhouse_exporter为例,它的主要工作原理,就是读取system库