mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-23 18:20:50 +00:00
Using lexer (incomplete) [#CLICKHOUSE-2].
This commit is contained in:
parent
2073fef375
commit
de75fa000b
@ -4,6 +4,7 @@
|
||||
#include <IO/WriteBufferFromString.h>
|
||||
#include <IO/WriteHelpers.h>
|
||||
#include <Parsers/ExpressionListParsers.h>
|
||||
#include <Parsers/parseQuery.h>
|
||||
#include <Parsers/queryToString.h>
|
||||
|
||||
|
||||
@ -26,14 +27,8 @@ ReshardingJob::ReshardingJob(const std::string & serialized_job)
|
||||
std::string expr;
|
||||
readBinary(expr, buf);
|
||||
|
||||
IParser::Pos pos = expr.data();
|
||||
IParser::Pos max_parsed_pos = pos;
|
||||
const char * end = pos + expr.size();
|
||||
|
||||
ParserExpression parser;
|
||||
Expected expected = "";
|
||||
if (!parser.parse(pos, end, sharding_key_expr, max_parsed_pos, expected))
|
||||
throw Exception{"ReshardingJob: cannot parse sharding expression.", ErrorCodes::LOGICAL_ERROR};
|
||||
sharding_key_expr = parseQuery(parser, expr.data(), expr.data() + expr.size(), "Sharding key expression");
|
||||
|
||||
readBinary(coordinator_id, buf);
|
||||
readVarUInt(block_number, buf);
|
||||
|
Loading…
Reference in New Issue
Block a user