Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
340eecf4
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
340eecf4
编写于
11月 24, 2020
作者:
R
robot-clickhouse
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Backport #17274 to 20.12: Fix AST formatting in log messages
上级
dc15a12f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
21 addition
and
5 deletion
+21
-5
base/common/logger_useful.h
base/common/logger_useful.h
+0
-1
src/Interpreters/InterpreterCreateQuery.cpp
src/Interpreters/InterpreterCreateQuery.cpp
+2
-2
src/Parsers/formatAST.h
src/Parsers/formatAST.h
+17
-1
src/Storages/Kafka/ReadBufferFromKafkaConsumer.cpp
src/Storages/Kafka/ReadBufferFromKafkaConsumer.cpp
+1
-0
src/Storages/StorageDistributed.cpp
src/Storages/StorageDistributed.cpp
+1
-1
未找到文件。
base/common/logger_useful.h
浏览文件 @
340eecf4
...
...
@@ -3,7 +3,6 @@
/// Macros for convenient usage of Poco logger.
#include <fmt/format.h>
#include <fmt/ostream.h>
#include <Poco/Logger.h>
#include <Poco/Message.h>
#include <Common/CurrentThread.h>
...
...
src/Interpreters/InterpreterCreateQuery.cpp
浏览文件 @
340eecf4
...
...
@@ -115,7 +115,7 @@ BlockIO InterpreterCreateQuery::createDatabase(ASTCreateQuery & create)
auto
ast
=
DatabaseOnDisk
::
parseQueryFromMetadata
(
nullptr
,
context
,
metadata_file_path
);
create
=
ast
->
as
<
ASTCreateQuery
&>
();
if
(
!
create
.
table
.
empty
()
||
!
create
.
storage
)
throw
Exception
(
ErrorCodes
::
INCORRECT_QUERY
,
"Metadata file {} contains incorrect CREATE DATABASE query"
,
metadata_file_path
);
throw
Exception
(
ErrorCodes
::
INCORRECT_QUERY
,
"Metadata file {} contains incorrect CREATE DATABASE query"
,
metadata_file_path
.
string
()
);
create
.
attach
=
true
;
create
.
attach_short_syntax
=
true
;
create
.
database
=
database_name
;
...
...
@@ -149,7 +149,7 @@ BlockIO InterpreterCreateQuery::createDatabase(ASTCreateQuery & create)
metadata_path
=
metadata_path
/
"store"
/
DatabaseCatalog
::
getPathForUUID
(
create
.
uuid
);
if
(
!
create
.
attach
&&
fs
::
exists
(
metadata_path
))
throw
Exception
(
ErrorCodes
::
DATABASE_ALREADY_EXISTS
,
"Metadata directory {} already exists"
,
metadata_path
);
throw
Exception
(
ErrorCodes
::
DATABASE_ALREADY_EXISTS
,
"Metadata directory {} already exists"
,
metadata_path
.
string
()
);
}
else
{
...
...
src/Parsers/formatAST.h
浏览文件 @
340eecf4
#pragma once
#include <ostream>
#include <Parsers/IAST.h>
...
...
@@ -29,3 +28,20 @@ inline WriteBuffer & operator<<(WriteBuffer & buf, const ASTPtr & ast)
}
}
template
<
>
struct
fmt
::
formatter
<
DB
::
ASTPtr
>
{
template
<
typename
ParseContext
>
constexpr
auto
parse
(
ParseContext
&
context
)
{
return
context
.
begin
();
}
template
<
typename
FormatContext
>
auto
format
(
const
DB
::
ASTPtr
&
ast
,
FormatContext
&
context
)
{
return
fmt
::
format_to
(
context
.
out
(),
"{}"
,
DB
::
serializeAST
(
*
ast
));
}
};
src/Storages/Kafka/ReadBufferFromKafkaConsumer.cpp
浏览文件 @
340eecf4
...
...
@@ -4,6 +4,7 @@
#include <cppkafka/cppkafka.h>
#include <boost/algorithm/string/join.hpp>
#include <fmt/ostream.h>
#include <algorithm>
namespace
DB
...
...
src/Storages/StorageDistributed.cpp
浏览文件 @
340eecf4
...
...
@@ -695,7 +695,7 @@ void StorageDistributed::createDirectoryMonitors(const std::string & disk)
if
(
std
::
filesystem
::
is_empty
(
dir_path
))
{
LOG_DEBUG
(
log
,
"Removing {} (used for async INSERT into Distributed)"
,
dir_path
);
LOG_DEBUG
(
log
,
"Removing {} (used for async INSERT into Distributed)"
,
dir_path
.
string
()
);
/// Will be created by DistributedBlockOutputStream on demand.
std
::
filesystem
::
remove
(
dir_path
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录