Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
bc45598c
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,发现更多精彩内容 >>
提交
bc45598c
编写于
6月 15, 2017
作者:
A
Alexey Milovidov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed name [#CLICKHOUSE-2].
上级
221c0540
变更
25
隐藏空白更改
内联
并排
Showing
25 changed file
with
61 addition
and
61 deletion
+61
-61
dbms/src/Parsers/ASTQueryWithOnCluster.cpp
dbms/src/Parsers/ASTQueryWithOnCluster.cpp
+1
-1
dbms/src/Parsers/CommonParsers.cpp
dbms/src/Parsers/CommonParsers.cpp
+7
-7
dbms/src/Parsers/CommonParsers.h
dbms/src/Parsers/CommonParsers.h
+4
-4
dbms/src/Parsers/ExpressionElementParsers.cpp
dbms/src/Parsers/ExpressionElementParsers.cpp
+12
-12
dbms/src/Parsers/ExpressionListParsers.cpp
dbms/src/Parsers/ExpressionListParsers.cpp
+8
-8
dbms/src/Parsers/ParserAlterQuery.cpp
dbms/src/Parsers/ParserAlterQuery.cpp
+1
-1
dbms/src/Parsers/ParserCase.cpp
dbms/src/Parsers/ParserCase.cpp
+1
-1
dbms/src/Parsers/ParserCheckQuery.cpp
dbms/src/Parsers/ParserCheckQuery.cpp
+1
-1
dbms/src/Parsers/ParserCreateQuery.cpp
dbms/src/Parsers/ParserCreateQuery.cpp
+3
-3
dbms/src/Parsers/ParserCreateQuery.h
dbms/src/Parsers/ParserCreateQuery.h
+2
-2
dbms/src/Parsers/ParserDropQuery.cpp
dbms/src/Parsers/ParserDropQuery.cpp
+1
-1
dbms/src/Parsers/ParserEnumElement.cpp
dbms/src/Parsers/ParserEnumElement.cpp
+1
-1
dbms/src/Parsers/ParserInsertQuery.cpp
dbms/src/Parsers/ParserInsertQuery.cpp
+2
-2
dbms/src/Parsers/ParserKillQueryQuery.cpp
dbms/src/Parsers/ParserKillQueryQuery.cpp
+1
-1
dbms/src/Parsers/ParserOptimizeQuery.cpp
dbms/src/Parsers/ParserOptimizeQuery.cpp
+1
-1
dbms/src/Parsers/ParserQueryWithOutput.h
dbms/src/Parsers/ParserQueryWithOutput.h
+1
-1
dbms/src/Parsers/ParserRenameQuery.cpp
dbms/src/Parsers/ParserRenameQuery.cpp
+2
-2
dbms/src/Parsers/ParserSampleRatio.cpp
dbms/src/Parsers/ParserSampleRatio.cpp
+2
-2
dbms/src/Parsers/ParserSelectQuery.cpp
dbms/src/Parsers/ParserSelectQuery.cpp
+1
-1
dbms/src/Parsers/ParserSetQuery.cpp
dbms/src/Parsers/ParserSetQuery.cpp
+2
-2
dbms/src/Parsers/ParserShowProcesslistQuery.h
dbms/src/Parsers/ParserShowProcesslistQuery.h
+1
-1
dbms/src/Parsers/ParserShowTablesQuery.cpp
dbms/src/Parsers/ParserShowTablesQuery.cpp
+1
-1
dbms/src/Parsers/ParserTablePropertiesQuery.cpp
dbms/src/Parsers/ParserTablePropertiesQuery.cpp
+1
-1
dbms/src/Parsers/ParserTablesInSelectQuery.cpp
dbms/src/Parsers/ParserTablesInSelectQuery.cpp
+3
-3
dbms/src/Parsers/ParserUseQuery.cpp
dbms/src/Parsers/ParserUseQuery.cpp
+1
-1
未找到文件。
dbms/src/Parsers/ASTQueryWithOnCluster.cpp
浏览文件 @
bc45598c
...
...
@@ -18,7 +18,7 @@ std::string ASTQueryWithOnCluster::getRewrittenQueryWithoutOnCluster(const std::
bool
ASTQueryWithOnCluster
::
parse
(
Pos
&
pos
,
Pos
end
,
std
::
string
&
cluster_str
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ws
.
ignore
(
pos
,
end
);
...
...
dbms/src/Parsers/CommonParsers.cpp
浏览文件 @
bc45598c
...
...
@@ -37,19 +37,19 @@ bool ParserString::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_parsed
}
ParserWhite
Space
::
ParserWhiteS
pace
(
bool
allow_newlines_
)
ParserWhite
space
::
ParserWhites
pace
(
bool
allow_newlines_
)
:
allow_newlines
(
allow_newlines_
)
{
}
const
char
*
ParserWhite
S
pace
::
getName
()
const
const
char
*
ParserWhite
s
pace
::
getName
()
const
{
return
"white space"
;
}
bool
ParserWhite
S
pace
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
bool
ParserWhite
s
pace
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
Pos
begin
=
pos
;
while
(
pos
<
end
&&
(
*
pos
==
' '
||
*
pos
==
'\t'
||
(
allow_newlines
&&
*
pos
==
'\n'
)
||
*
pos
==
'\r'
||
*
pos
==
'\f'
))
...
...
@@ -128,21 +128,21 @@ bool ParserComment::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_parse
}
ParserWhite
SpaceOrComments
::
ParserWhiteS
paceOrComments
(
bool
allow_newlines_outside_comments_
)
ParserWhite
spaceOrComments
::
ParserWhites
paceOrComments
(
bool
allow_newlines_outside_comments_
)
:
allow_newlines_outside_comments
(
allow_newlines_outside_comments_
)
{
}
const
char
*
ParserWhite
S
paceOrComments
::
getName
()
const
const
char
*
ParserWhite
s
paceOrComments
::
getName
()
const
{
return
"white space or comments"
;
}
bool
ParserWhite
S
paceOrComments
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
bool
ParserWhite
s
paceOrComments
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
pace
p1
(
allow_newlines_outside_comments
);
ParserWhite
s
pace
p1
(
allow_newlines_outside_comments
);
ParserComment
p2
;
bool
res
=
false
;
...
...
dbms/src/Parsers/CommonParsers.h
浏览文件 @
bc45598c
...
...
@@ -29,10 +29,10 @@ protected:
/** whitespace characters
*/
class
ParserWhite
S
pace
:
public
IParserBase
class
ParserWhite
s
pace
:
public
IParserBase
{
public:
ParserWhite
S
pace
(
bool
allow_newlines_
=
true
);
ParserWhite
s
pace
(
bool
allow_newlines_
=
true
);
protected:
bool
allow_newlines
;
...
...
@@ -72,10 +72,10 @@ protected:
};
class
ParserWhite
S
paceOrComments
:
public
IParserBase
class
ParserWhite
s
paceOrComments
:
public
IParserBase
{
public:
ParserWhite
S
paceOrComments
(
bool
allow_newlines_outside_comments_
=
true
);
ParserWhite
s
paceOrComments
(
bool
allow_newlines_outside_comments_
=
true
);
protected:
bool
allow_newlines_outside_comments
;
...
...
dbms/src/Parsers/ExpressionElementParsers.cpp
浏览文件 @
bc45598c
...
...
@@ -40,7 +40,7 @@ bool ParserArray::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_parsed_
ASTPtr
contents_node
;
ParserString
open
(
"["
),
close
(
"]"
);
ParserExpressionList
contents
(
false
);
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
if
(
!
open
.
ignore
(
pos
,
end
,
max_parsed_pos
,
expected
))
return
false
;
...
...
@@ -69,7 +69,7 @@ bool ParserParenthesisExpression::parseImpl(Pos & pos, Pos end, ASTPtr & node, P
ASTPtr
contents_node
;
ParserString
open
(
"("
),
close
(
")"
);
ParserExpressionList
contents
(
false
);
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
if
(
!
open
.
ignore
(
pos
,
end
,
max_parsed_pos
,
expected
))
return
false
;
...
...
@@ -114,7 +114,7 @@ bool ParserSubquery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_pars
ASTPtr
select_node
;
ParserString
open
(
"("
),
close
(
")"
);
ParserSelectQuery
select
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
if
(
!
open
.
ignore
(
pos
,
end
,
max_parsed_pos
,
expected
))
return
false
;
...
...
@@ -206,7 +206,7 @@ bool ParserFunction::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_pars
ParserString
open
(
"("
),
close
(
")"
);
ParserString
distinct
(
"DISTINCT"
,
true
,
true
);
ParserExpressionList
contents
(
false
);
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
bool
has_distinct_modifier
=
false
;
...
...
@@ -330,7 +330,7 @@ bool ParserCastExpression::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & ma
/// Parse as CAST(expression AS type)
ParserString
open
(
"("
),
close
(
")"
),
comma
(
","
);
ParserExpressionInCastExpression
expression_and_type
(
false
);
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ASTPtr
expr_list_args
;
...
...
@@ -553,7 +553,7 @@ bool ParserArrayOfLiterals::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & m
return
false
;
}
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserLiteral
literal_p
;
++
pos
;
...
...
@@ -649,7 +649,7 @@ const char * ParserAliasBase::restricted_keywords[] =
template
<
typename
ParserIdentifier
>
bool
ParserAliasImpl
<
ParserIdentifier
>::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_as
(
"AS"
,
true
,
true
);
ParserIdentifier
id_p
;
...
...
@@ -702,12 +702,12 @@ bool ParserQualifiedAsterisk::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos &
if
(
!
ParserCompoundIdentifier
().
parse
(
pos
,
end
,
node
,
max_parsed_pos
,
expected
))
return
false
;
ParserWhite
S
paceOrComments
().
ignore
(
pos
,
end
);
ParserWhite
s
paceOrComments
().
ignore
(
pos
,
end
);
if
(
!
ParserString
(
"."
).
ignore
(
pos
,
end
,
max_parsed_pos
,
expected
))
return
false
;
ParserWhite
S
paceOrComments
().
ignore
(
pos
,
end
);
ParserWhite
s
paceOrComments
().
ignore
(
pos
,
end
);
if
(
!
ParserString
(
"*"
).
ignore
(
pos
,
end
,
max_parsed_pos
,
expected
))
return
false
;
...
...
@@ -767,7 +767,7 @@ bool ParserExpressionElement::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos &
template
<
typename
ParserAlias
>
bool
ParserWithOptionalAliasImpl
<
ParserAlias
>::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
if
(
!
elem_parser
->
parse
(
pos
,
end
,
node
,
max_parsed_pos
,
expected
))
return
false
;
...
...
@@ -824,7 +824,7 @@ bool ParserOrderByElement::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & ma
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserExpressionWithOptionalAlias
elem_p
(
false
);
ParserString
ascending
(
"ASCENDING"
,
true
,
true
);
ParserString
descending
(
"DESCENDING"
,
true
,
true
);
...
...
@@ -891,7 +891,7 @@ bool ParserWeightedZooKeeperPath::parseImpl(Pos & pos, Pos end, ASTPtr & node, P
ParserString
s_weight
(
"WEIGHT"
,
true
,
true
);
ParserStringLiteral
path_p
;
ParserUnsignedInteger
weight_p
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
auto
weighted_zookeeper_path
=
std
::
make_shared
<
ASTWeightedZooKeeperPath
>
();
node
=
weighted_zookeeper_path
;
...
...
dbms/src/Parsers/ExpressionListParsers.cpp
浏览文件 @
bc45598c
...
...
@@ -76,7 +76,7 @@ const char * ParserTupleElementExpression::operators[] =
bool
ParserList
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
bool
first
=
true
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
auto
list
=
std
::
make_shared
<
ASTExpressionList
>
();
node
=
list
;
...
...
@@ -122,7 +122,7 @@ bool ParserList::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_parsed_p
bool
ParserLeftAssociativeBinaryOperatorList
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
bool
first
=
true
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
Pos
begin
=
pos
;
while
(
1
)
...
...
@@ -198,7 +198,7 @@ bool ParserLeftAssociativeBinaryOperatorList::parseImpl(Pos & pos, Pos end, ASTP
bool
ParserVariableArityOperatorList
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
Pos
begin
=
pos
;
ASTPtr
arguments
;
...
...
@@ -239,7 +239,7 @@ bool ParserBetweenExpression::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos &
/// For the expression (subject BETWEEN left AND right)
/// create an AST the same as for (subject> = left AND subject <= right).
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_between
(
"BETWEEN"
,
true
,
true
);
ParserString
s_and
(
"AND"
,
true
,
true
);
...
...
@@ -320,7 +320,7 @@ bool ParserBetweenExpression::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos &
bool
ParserTernaryOperatorExpression
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
symbol1
(
"?"
);
ParserString
symbol2
(
":"
);
...
...
@@ -381,7 +381,7 @@ bool ParserTernaryOperatorExpression::parseImpl(Pos & pos, Pos end, ASTPtr & nod
bool
ParserLambdaExpression
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
arrow
(
"->"
);
ParserString
open
(
"("
);
ParserString
close
(
")"
);
...
...
@@ -448,7 +448,7 @@ bool ParserLambdaExpression::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos &
bool
ParserPrefixUnaryOperatorExpression
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
/// try to find any of the valid operators
Pos
begin
=
pos
;
...
...
@@ -600,7 +600,7 @@ bool ParserOrderByExpressionList::parseImpl(Pos & pos, Pos end, ASTPtr & node, P
bool
ParserNullityChecking
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ASTPtr
node_comp
;
if
(
!
ParserComparisonExpression
{}.
parse
(
pos
,
end
,
node_comp
,
max_parsed_pos
,
expected
))
...
...
dbms/src/Parsers/ParserAlterQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -42,7 +42,7 @@ bool ParserAlterQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_pa
ParserString
s_comma
(
","
);
ParserString
s_doubledot
(
".."
);
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserIdentifier
table_parser
;
ParserCompoundIdentifier
parser_name
;
...
...
dbms/src/Parsers/ParserCase.cpp
浏览文件 @
bc45598c
...
...
@@ -12,7 +12,7 @@ bool ParserCase::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_parsed_p
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_case
{
"CASE"
,
true
,
true
};
ParserString
s_when
{
"WHEN"
,
true
,
true
};
ParserString
s_then
{
"THEN"
,
true
,
true
};
...
...
dbms/src/Parsers/ParserCheckQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -12,7 +12,7 @@ namespace DB
bool
ParserCheckQuery
::
parseImpl
(
IParser
::
Pos
&
pos
,
IParser
::
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_check
(
"CHECK"
,
true
,
true
);
ParserString
s_table
(
"TABLE"
,
true
,
true
);
ParserString
s_dot
(
"."
);
...
...
dbms/src/Parsers/ParserCreateQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -12,7 +12,7 @@ namespace DB
bool
ParserNestedTable
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
open
(
"("
);
ParserString
close
(
")"
);
ParserIdentifier
name_p
;
...
...
@@ -115,7 +115,7 @@ bool ParserColumnDeclarationList::parseImpl(Pos & pos, Pos end, ASTPtr & node, P
bool
ParserEngine
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_engine
(
"ENGINE"
,
true
,
true
);
ParserString
s_eq
(
"="
);
ParserIdentifierWithOptionalParameters
storage_p
;
...
...
@@ -145,7 +145,7 @@ bool ParserCreateQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_p
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_create
(
"CREATE"
,
true
,
true
);
ParserString
s_temporary
(
"TEMPORARY"
,
true
,
true
);
ParserString
s_attach
(
"ATTACH"
,
true
,
true
);
...
...
dbms/src/Parsers/ParserCreateQuery.h
浏览文件 @
bc45598c
...
...
@@ -74,7 +74,7 @@ bool IParserNameTypePair<NameParser>::parseImpl(Pos & pos, Pos end, ASTPtr & nod
{
NameParser
name_parser
;
ParserIdentifierWithOptionalParameters
type_parser
;
ParserWhite
S
paceOrComments
ws_parser
;
ParserWhite
s
paceOrComments
ws_parser
;
Pos
begin
=
pos
;
...
...
@@ -119,7 +119,7 @@ bool IParserColumnDeclaration<NameParser>::parseImpl(Pos & pos, Pos end, ASTPtr
{
NameParser
name_parser
;
ParserIdentifierWithOptionalParameters
type_parser
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_default
{
"DEFAULT"
,
true
,
true
};
ParserString
s_materialized
{
"MATERIALIZED"
,
true
,
true
};
ParserString
s_alias
{
"ALIAS"
,
true
,
true
};
...
...
dbms/src/Parsers/ParserDropQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -15,7 +15,7 @@ bool ParserDropQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_par
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_drop
(
"DROP"
,
true
,
true
);
ParserString
s_detach
(
"DETACH"
,
true
,
true
);
ParserString
s_table
(
"TABLE"
,
true
,
true
);
...
...
dbms/src/Parsers/ParserEnumElement.cpp
浏览文件 @
bc45598c
...
...
@@ -9,7 +9,7 @@ namespace DB
bool
ParserEnumElement
::
parseImpl
(
IParser
::
Pos
&
pos
,
IParser
::
Pos
end
,
ASTPtr
&
node
,
IParser
::
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserString
equality_sign_parser
(
"="
);
ParserWhite
S
pace
ws
;
ParserWhite
s
pace
ws
;
const
auto
begin
=
pos
;
ASTPtr
name
;
...
...
dbms/src/Parsers/ParserInsertQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -25,7 +25,7 @@ bool ParserInsertQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_p
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_insert
(
"INSERT"
,
true
,
true
);
ParserString
s_into
(
"INTO"
,
true
,
true
);
ParserString
s_dot
(
"."
);
...
...
@@ -104,7 +104,7 @@ bool ParserInsertQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_p
return
false
;
/// Data starts after the first newline, if there is one, or after all the whitespace characters, otherwise.
ParserWhite
S
paceOrComments
ws_without_nl
(
false
);
ParserWhite
s
paceOrComments
ws_without_nl
(
false
);
ws_without_nl
.
ignore
(
pos
,
end
);
if
(
pos
!=
end
&&
*
pos
==
';'
)
...
...
dbms/src/Parsers/ParserKillQueryQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -21,7 +21,7 @@ bool ParserKillQueryQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & ma
Pos
begin
=
pos
;
auto
query
=
std
::
make_shared
<
ASTKillQueryQuery
>
();
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ws
.
ignore
(
pos
,
end
);
...
...
dbms/src/Parsers/ParserOptimizeQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -16,7 +16,7 @@ bool ParserOptimizeQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_optimize
(
"OPTIMIZE"
,
true
,
true
);
ParserString
s_table
(
"TABLE"
,
true
,
true
);
ParserString
s_partition
(
"PARTITION"
,
true
,
true
);
...
...
dbms/src/Parsers/ParserQueryWithOutput.h
浏览文件 @
bc45598c
...
...
@@ -16,7 +16,7 @@ protected:
bool
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
override
;
protected:
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
};
}
dbms/src/Parsers/ParserRenameQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -16,7 +16,7 @@ static bool parseDatabaseAndTable(
ASTRenameQuery
::
Table
&
db_and_table
,
IParser
::
Pos
&
pos
,
IParser
::
Pos
end
,
IParser
::
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserIdentifier
name_p
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_dot
(
"."
);
ASTPtr
database
;
...
...
@@ -49,7 +49,7 @@ bool ParserRenameQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_p
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_rename
(
"RENAME"
,
true
,
true
);
ParserString
s_table
(
"TABLE"
,
true
,
true
);
ParserString
s_to
(
"TO"
,
true
,
true
);
...
...
dbms/src/Parsers/ParserSampleRatio.cpp
浏览文件 @
bc45598c
...
...
@@ -12,7 +12,7 @@ namespace DB
static
bool
parseDecimal
(
IParser
::
Pos
&
pos
,
IParser
::
Pos
end
,
ASTSampleRatio
::
Rational
&
res
,
IParser
::
Pos
&
max_parsed_pos
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ws
.
ignore
(
pos
,
end
);
UInt64
num_before
=
0
;
...
...
@@ -90,7 +90,7 @@ bool ParserSampleRatio::parseImpl(IParser::Pos & pos, IParser::Pos end, ASTPtr &
{
auto
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ASTSampleRatio
::
Rational
numerator
;
ASTSampleRatio
::
Rational
denominator
;
...
...
dbms/src/Parsers/ParserSelectQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -28,7 +28,7 @@ bool ParserSelectQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_p
auto
select_query
=
std
::
make_shared
<
ASTSelectQuery
>
();
node
=
select_query
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_select
(
"SELECT"
,
true
,
true
);
ParserString
s_distinct
(
"DISTINCT"
,
true
,
true
);
ParserString
s_from
(
"FROM"
,
true
,
true
);
...
...
dbms/src/Parsers/ParserSetQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -17,7 +17,7 @@ static bool parseNameValuePair(ASTSetQuery::Change & change, IParser::Pos & pos,
{
ParserIdentifier
name_p
;
ParserLiteral
value_p
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_eq
(
"="
);
ASTPtr
name
;
...
...
@@ -51,7 +51,7 @@ bool ParserSetQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_pars
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_comma
(
","
);
bool
global
=
false
;
...
...
dbms/src/Parsers/ParserShowProcesslistQuery.h
浏览文件 @
bc45598c
...
...
@@ -21,7 +21,7 @@ protected:
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_show
(
"SHOW"
,
true
,
true
);
ParserString
s_processlist
(
"PROCESSLIST"
,
true
,
true
);
...
...
dbms/src/Parsers/ParserShowTablesQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -17,7 +17,7 @@ bool ParserShowTablesQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & m
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_show
(
"SHOW"
,
true
,
true
);
ParserString
s_tables
(
"TABLES"
,
true
,
true
);
ParserString
s_databases
(
"DATABASES"
,
true
,
true
);
...
...
dbms/src/Parsers/ParserTablePropertiesQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -15,7 +15,7 @@ bool ParserTablePropertiesQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Po
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_exists
(
"EXISTS"
,
true
,
true
);
ParserString
s_describe
(
"DESCRIBE"
,
true
,
true
);
ParserString
s_desc
(
"DESC"
,
true
,
true
);
...
...
dbms/src/Parsers/ParserTablesInSelectQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -20,7 +20,7 @@ namespace ErrorCodes
bool
ParserTableExpression
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
auto
res
=
std
::
make_shared
<
ASTTableExpression
>
();
ws
.
ignore
(
pos
,
end
);
...
...
@@ -92,7 +92,7 @@ bool ParserTableExpression::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & m
bool
ParserArrayJoin
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
auto
res
=
std
::
make_shared
<
ASTArrayJoin
>
();
ws
.
ignore
(
pos
,
end
);
...
...
@@ -147,7 +147,7 @@ bool ParserArrayJoin::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_par
bool
ParserTablesInSelectQueryElement
::
parseImpl
(
Pos
&
pos
,
Pos
end
,
ASTPtr
&
node
,
Pos
&
max_parsed_pos
,
Expected
&
expected
)
{
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
auto
res
=
std
::
make_shared
<
ASTTablesInSelectQueryElement
>
();
ws
.
ignore
(
pos
,
end
);
...
...
dbms/src/Parsers/ParserUseQuery.cpp
浏览文件 @
bc45598c
...
...
@@ -13,7 +13,7 @@ bool ParserUseQuery::parseImpl(Pos & pos, Pos end, ASTPtr & node, Pos & max_pars
{
Pos
begin
=
pos
;
ParserWhite
S
paceOrComments
ws
;
ParserWhite
s
paceOrComments
ws
;
ParserString
s_use
(
"USE"
,
true
,
true
);
ParserIdentifier
name_p
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录