ClickHouse/dbms/src/Parsers/iostream_debug_helpers.cpp
proller f9cd6a09e6 sql: initial EXTRACT(... FROM ...) support (#2196)
* start

* wip

* wip

* wip

* wip

* wip

* Fix clickhouse-server.postinst

* clean

* wip

* clean

* clean

* clean

* wip

* clean

* Update dump_variable.cpp
2018-04-13 22:35:08 +03:00

23 lines
581 B
C++

#include "iostream_debug_helpers.h"
#include <Parsers/IParser.h>
#include <Parsers/Lexer.h>
#include <Parsers/TokenIterator.h>
namespace DB
{
std::ostream & operator<<(std::ostream & stream, const Token & what) {
stream << "Token (type="<< static_cast<int>(what.type) <<"){"<< std::string{what.begin, what.end} << "}";
return stream;
}
std::ostream & operator<<(std::ostream & stream, const Expected & what) {
stream << "Expected {variants=";
dumpValue(stream, what.variants)
<< "; max_parsed_pos=" << what.max_parsed_pos << "}";
return stream;
}
}