提交 7068d1ff 编写于 作者: A Alexey Milovidov 提交者: alexey-milovidov

Using lexer (incomplete) [#CLICKHOUSE-2].

上级 de75fa00
......@@ -6,8 +6,8 @@
#include <Core/Block.h>
#include <Core/ColumnWithTypeAndName.h>
#include <IO/ReadBufferFromIStream.h>
#include <IO/WriteBufferFromOStream.h>
#include <IO/ReadBufferFromFile.h>
#include <IO/WriteBufferFromFile.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeString.h>
......@@ -38,11 +38,8 @@ try
col2.column = col2.type->createColumn();
sample.insert(col2);
std::ifstream istr("test_in");
std::ofstream ostr("test_out");
ReadBufferFromIStream in_buf(istr);
WriteBufferFromOStream out_buf(ostr);
ReadBufferFromFile in_buf("test_in");
WriteBufferFromFile out_buf("test_out");
RowInputStreamPtr row_input = std::make_shared<TabSeparatedRowInputStream>(in_buf, sample);
BlockInputStreamFromRowInputStream block_input(row_input, sample, DEFAULT_INSERT_BLOCK_SIZE, 0, 0);
......
......@@ -2,8 +2,8 @@
#include <list>
#include <iostream>
#include <IO/ReadBufferFromIStream.h>
#include <IO/WriteBufferFromOStream.h>
#include <IO/ReadBufferFromFileDescriptor.h>
#include <IO/WriteBufferFromFileDescriptor.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeString.h>
......@@ -26,62 +26,62 @@ try
{
NamesAndTypesList names_and_types_list
{
{"WatchID", std::make_shared<DataTypeUInt64>()},
{"JavaEnable", std::make_shared<DataTypeUInt8>()},
{"Title", std::make_shared<DataTypeString>()},
{"EventTime", std::make_shared<DataTypeDateTime>()},
{"CounterID", std::make_shared<DataTypeUInt32>()},
{"ClientIP", std::make_shared<DataTypeUInt32>()},
{"RegionID", std::make_shared<DataTypeUInt32>()},
{"UniqID", std::make_shared<DataTypeUInt64>()},
{"CounterClass", std::make_shared<DataTypeUInt8>()},
{"OS", std::make_shared<DataTypeUInt8>()},
{"UserAgent", std::make_shared<DataTypeUInt8>()},
{"URL", std::make_shared<DataTypeString>()},
{"Referer", std::make_shared<DataTypeString>()},
{"ResolutionWidth", std::make_shared<DataTypeUInt16>()},
{"ResolutionHeight", std::make_shared<DataTypeUInt16>()},
{"ResolutionDepth", std::make_shared<DataTypeUInt8>()},
{"FlashMajor", std::make_shared<DataTypeUInt8>()},
{"FlashMinor", std::make_shared<DataTypeUInt8>()},
{"FlashMinor2", std::make_shared<DataTypeString>()},
{"NetMajor", std::make_shared<DataTypeUInt8>()},
{"NetMinor", std::make_shared<DataTypeUInt8>()},
{"UserAgentMajor", std::make_shared<DataTypeUInt16>()},
{"UserAgentMinor", std::make_shared<DataTypeFixedString>(2)},
{"CookieEnable", std::make_shared<DataTypeUInt8>()},
{"JavascriptEnable", std::make_shared<DataTypeUInt8>()},
{"IsMobile", std::make_shared<DataTypeUInt8>()},
{"MobilePhone", std::make_shared<DataTypeUInt8>()},
{"MobilePhoneModel", std::make_shared<DataTypeString>()},
{"Params", std::make_shared<DataTypeString>()},
{"IPNetworkID", std::make_shared<DataTypeUInt32>()},
{"TraficSourceID", std::make_shared<DataTypeInt8>()},
{"SearchEngineID", std::make_shared<DataTypeUInt16>()},
{"SearchPhrase", std::make_shared<DataTypeString>()},
{"AdvEngineID", std::make_shared<DataTypeUInt8>()},
{"IsArtifical", std::make_shared<DataTypeUInt8>()},
{"WindowClientWidth", std::make_shared<DataTypeUInt16>()},
{"WindowClientHeight", std::make_shared<DataTypeUInt16>()},
{"ClientTimeZone", std::make_shared<DataTypeInt16>()},
{"ClientEventTime", std::make_shared<DataTypeDateTime>()},
{"SilverlightVersion1", std::make_shared<DataTypeUInt8>()},
{"SilverlightVersion2", std::make_shared<DataTypeUInt8>()},
{"SilverlightVersion3", std::make_shared<DataTypeUInt32>()},
{"SilverlightVersion4", std::make_shared<DataTypeUInt16>()},
{"PageCharset", std::make_shared<DataTypeString>()},
{"CodeVersion", std::make_shared<DataTypeUInt32>()},
{"IsLink", std::make_shared<DataTypeUInt8>()},
{"IsDownload", std::make_shared<DataTypeUInt8>()},
{"IsNotBounce", std::make_shared<DataTypeUInt8>()},
{"FUniqID", std::make_shared<DataTypeUInt64>()},
{"OriginalURL", std::make_shared<DataTypeString>()},
{"HID", std::make_shared<DataTypeUInt32>()},
{"IsOldCounter", std::make_shared<DataTypeUInt8>()},
{"IsEvent", std::make_shared<DataTypeUInt8>()},
{"IsParameter", std::make_shared<DataTypeUInt8>()},
{"DontCountHits", std::make_shared<DataTypeUInt8>()},
{"WithHash", std::make_shared<DataTypeUInt8>()},
{"WatchID", std::make_shared<DataTypeUInt64>()},
{"JavaEnable", std::make_shared<DataTypeUInt8>()},
{"Title", std::make_shared<DataTypeString>()},
{"EventTime", std::make_shared<DataTypeDateTime>()},
{"CounterID", std::make_shared<DataTypeUInt32>()},
{"ClientIP", std::make_shared<DataTypeUInt32>()},
{"RegionID", std::make_shared<DataTypeUInt32>()},
{"UniqID", std::make_shared<DataTypeUInt64>()},
{"CounterClass", std::make_shared<DataTypeUInt8>()},
{"OS", std::make_shared<DataTypeUInt8>()},
{"UserAgent", std::make_shared<DataTypeUInt8>()},
{"URL", std::make_shared<DataTypeString>()},
{"Referer", std::make_shared<DataTypeString>()},
{"ResolutionWidth", std::make_shared<DataTypeUInt16>()},
{"ResolutionHeight", std::make_shared<DataTypeUInt16>()},
{"ResolutionDepth", std::make_shared<DataTypeUInt8>()},
{"FlashMajor", std::make_shared<DataTypeUInt8>()},
{"FlashMinor", std::make_shared<DataTypeUInt8>()},
{"FlashMinor2", std::make_shared<DataTypeString>()},
{"NetMajor", std::make_shared<DataTypeUInt8>()},
{"NetMinor", std::make_shared<DataTypeUInt8>()},
{"UserAgentMajor", std::make_shared<DataTypeUInt16>()},
{"UserAgentMinor", std::make_shared<DataTypeFixedString>(2)},
{"CookieEnable", std::make_shared<DataTypeUInt8>()},
{"JavascriptEnable", std::make_shared<DataTypeUInt8>()},
{"IsMobile", std::make_shared<DataTypeUInt8>()},
{"MobilePhone", std::make_shared<DataTypeUInt8>()},
{"MobilePhoneModel", std::make_shared<DataTypeString>()},
{"Params", std::make_shared<DataTypeString>()},
{"IPNetworkID", std::make_shared<DataTypeUInt32>()},
{"TraficSourceID", std::make_shared<DataTypeInt8>()},
{"SearchEngineID", std::make_shared<DataTypeUInt16>()},
{"SearchPhrase", std::make_shared<DataTypeString>()},
{"AdvEngineID", std::make_shared<DataTypeUInt8>()},
{"IsArtifical", std::make_shared<DataTypeUInt8>()},
{"WindowClientWidth", std::make_shared<DataTypeUInt16>()},
{"WindowClientHeight", std::make_shared<DataTypeUInt16>()},
{"ClientTimeZone", std::make_shared<DataTypeInt16>()},
{"ClientEventTime", std::make_shared<DataTypeDateTime>()},
{"SilverlightVersion1", std::make_shared<DataTypeUInt8>()},
{"SilverlightVersion2", std::make_shared<DataTypeUInt8>()},
{"SilverlightVersion3", std::make_shared<DataTypeUInt32>()},
{"SilverlightVersion4", std::make_shared<DataTypeUInt16>()},
{"PageCharset", std::make_shared<DataTypeString>()},
{"CodeVersion", std::make_shared<DataTypeUInt32>()},
{"IsLink", std::make_shared<DataTypeUInt8>()},
{"IsDownload", std::make_shared<DataTypeUInt8>()},
{"IsNotBounce", std::make_shared<DataTypeUInt8>()},
{"FUniqID", std::make_shared<DataTypeUInt64>()},
{"OriginalURL", std::make_shared<DataTypeString>()},
{"HID", std::make_shared<DataTypeUInt32>()},
{"IsOldCounter", std::make_shared<DataTypeUInt8>()},
{"IsEvent", std::make_shared<DataTypeUInt8>()},
{"IsParameter", std::make_shared<DataTypeUInt8>()},
{"DontCountHits", std::make_shared<DataTypeUInt8>()},
{"WithHash", std::make_shared<DataTypeUInt8>()},
};
/// we create a description of how to read data from the tab separated dump
......@@ -98,8 +98,8 @@ try
/// read the data from row tsv file and simultaneously write to the block tsv file
{
ReadBufferFromIStream in_buf(std::cin);
WriteBufferFromOStream out_buf(std::cout);
ReadBufferFromFileDescriptor in_buf(STDIN_FILENO);
WriteBufferFromFileDescriptor out_buf(STDOUT_FILENO);
RowInputStreamPtr row_in = std::make_shared<TabSeparatedRowInputStream>(in_buf, sample);
BlockInputStreamFromRowInputStream in(row_in, sample, DEFAULT_INSERT_BLOCK_SIZE, 0, 0);
......
......@@ -5,8 +5,8 @@
#include <Common/Stopwatch.h>
#include <IO/ReadBufferFromIStream.h>
#include <IO/WriteBufferFromOStream.h>
#include <IO/ReadBufferFromFileDescriptor.h>
#include <IO/WriteBufferFromFileDescriptor.h>
#include <Columns/ColumnString.h>
#include <DataTypes/DataTypeString.h>
......@@ -36,7 +36,7 @@ try
}
std::ofstream ostr("test");
WriteBufferFromOStream out_buf(ostr);
WriteBufferFromFileDescriptor out_buf(STDOUT_FILENO);
stopwatch.restart();
data_type.serializeBinaryBulk(*column, out_buf, 0, 0);
......@@ -49,7 +49,7 @@ try
std::shared_ptr<ColumnString> column = std::make_shared<ColumnString>();
std::ifstream istr("test");
ReadBufferFromIStream in_buf(istr);
ReadBufferFromFileDescriptor in_buf(STDIN_FILENO);
stopwatch.restart();
data_type.deserializeBinaryBulk(*column, in_buf, n, 0);
......
......@@ -24,10 +24,6 @@ void test(size_t data_size)
out.write(data, data_size);
out.next();
//std::cout.write(data, data_size);
//std::cout << std::endl;
//std::cout << io.str() << std::endl;
DB::ReadBufferFromIStream source(io, read_buffer_block_size);
DB::HashingReadBuffer buf(source);
......
......@@ -5,16 +5,15 @@
#include <Core/Types.h>
#include <IO/ReadHelpers.h>
#include <IO/ReadBufferFromIStream.h>
#include <IO/ReadBufferFromString.h>
int main(int argc, char ** argv)
{
try
{
std::stringstream s;
s << "-123456 123.456 вася пе\\tтя\t'\\'xyz\\\\'";
DB::ReadBufferFromIStream in(s);
std::string s = "-123456 123.456 вася пе\\tтя\t'\\'xyz\\\\'";
DB::ReadBufferFromString in(s);
DB::Int64 a;
DB::Float64 b;
......
......@@ -5,15 +5,14 @@
#include <Core/Types.h>
#include <IO/ReadHelpers.h>
#include <IO/ReadBufferFromIStream.h>
#include <IO/ReadBufferFromFile.h>
int main(int argc, char ** argv)
{
try
{
std::ifstream istr("test");
DB::ReadBufferFromIStream in(istr);
DB::ReadBufferFromFile in("test");
DB::Int64 a = 0;
DB::Float64 b = 0;
......
......@@ -5,7 +5,7 @@
#include <Core/Types.h>
#include <IO/ReadHelpers.h>
#include <IO/ReadBufferFromIStream.h>
#include <IO/ReadBufferFromFile.h>
#include <IO/CompressedReadBuffer.h>
......@@ -13,8 +13,7 @@ int main(int argc, char ** argv)
{
try
{
std::ifstream istr("DevicePixelRatio");
DB::ReadBufferFromIStream in(istr);
DB::ReadBufferFromFile in("DevicePixelRatio");
DB::Float32 b = 0;
......
add_executable (expression expression.cpp)
target_link_libraries (expression dbms)
add_executable (expression_analyzer expression_analyzer.cpp)
target_link_libraries (expression_analyzer dbms)
add_executable (create_query create_query.cpp)
target_link_libraries (create_query dbms)
......
#include <Interpreters/ExpressionAnalyzer.h>
#include <Interpreters/ExpressionActions.h>
#include <Interpreters/Context.h>
#include <Parsers/ParserSelectQuery.h>
#include <Parsers/ASTSelectQuery.h>
#include <Parsers/formatAST.h>
#include <Parsers/parseQuery.h>
#include <Parsers/ExpressionListParsers.h>
#include <DataTypes/DataTypeFactory.h>
int main(int argc, char ** argv)
{
using namespace DB;
try
{
if (argc < 2)
{
std::cerr << "at least 1 argument expected" << std::endl;
return 1;
}
Context context = Context::createGlobal();
NamesAndTypesList columns;
for (int i = 2; i + 1 < argc; i += 2)
{
NameAndTypePair col;
col.name = argv[i];
col.type = DataTypeFactory::instance().get(argv[i + 1]);
columns.push_back(col);
}
ASTPtr root;
ParserPtr parsers[] = {std::make_unique<ParserSelectQuery>(), std::make_unique<ParserExpressionList>(false)};
for (size_t i = 0; i < sizeof(parsers)/sizeof(parsers[0]); ++i)
{
IParser & parser = *parsers[i];
const char * pos = argv[1];
const char * end = argv[1] + strlen(argv[1]);
const char * max_parsed_pos = pos;
Expected expected = "";
if (parser.parse(pos, end, root, max_parsed_pos, expected))
break;
else
root = nullptr;
}
if (!root)
{
std::cerr << "invalid expression (should be select query or expression list)" << std::endl;
return 2;
}
formatAST(*root, std::cout);
std::cout << std::endl;
ExpressionAnalyzer analyzer(root, context, {}, columns);
Names required = analyzer.getRequiredColumns();
std::cout << "required columns:\n";
for (size_t i = 0; i < required.size(); ++i)
{
std::cout << required[i] << "\n";
}
std::cout << "\n";
std::cout << "only consts:\n\n" << analyzer.getConstActions()->dumpActions() << "\n";
if (analyzer.hasAggregation())
{
Names key_names;
AggregateDescriptions aggregates;
analyzer.getAggregateInfo(key_names, aggregates);
std::cout << "keys:\n";
for (size_t i = 0; i < key_names.size(); ++i)
std::cout << key_names[i] << "\n";
std::cout << "\n";
std::cout << "aggregates:\n";
for (size_t i = 0; i < aggregates.size(); ++i)
{
AggregateDescription desc = aggregates[i];
std::cout << desc.column_name << " = " << desc.function->getName() << " ( ";
for (size_t j = 0; j < desc.argument_names.size(); ++j)
std::cout << desc.argument_names[j] << " ";
std::cout << ")\n";
}
std::cout << "\n";
ExpressionActionsChain before;
if (analyzer.appendWhere(before, false))
before.addStep();
analyzer.appendAggregateFunctionsArguments(before, false);
analyzer.appendGroupBy(before, false);
before.finalize();
ExpressionActionsChain after;
if (analyzer.appendHaving(after, false))
after.addStep();
analyzer.appendSelect(after, false);
analyzer.appendOrderBy(after, false);
after.addStep();
analyzer.appendProjectResult(after, false);
after.finalize();
std::cout << "before aggregation:\n\n";
for (size_t i = 0; i < before.steps.size(); ++i)
{
std::cout << before.steps[i].actions->dumpActions();
std::cout << std::endl;
}
std::cout << "\nafter aggregation:\n\n";
for (size_t i = 0; i < after.steps.size(); ++i)
{
std::cout << after.steps[i].actions->dumpActions();
std::cout << std::endl;
}
}
else
{
if (typeid_cast<ASTSelectQuery *>(&*root))
{
ExpressionActionsChain chain;
if (analyzer.appendWhere(chain, false))
chain.addStep();
analyzer.appendSelect(chain, false);
analyzer.appendOrderBy(chain, false);
chain.addStep();
analyzer.appendProjectResult(chain, false);
chain.finalize();
for (size_t i = 0; i < chain.steps.size(); ++i)
{
std::cout << chain.steps[i].actions->dumpActions();
std::cout << std::endl;
}
}
else
{
std::cout << "unprojected actions:\n\n" << analyzer.getActions(false)->dumpActions() << "\n";
std::cout << "projected actions:\n\n" << analyzer.getActions(true)->dumpActions() << "\n";
}
}
}
catch (Exception & e)
{
std::cerr << "Exception " << e.what() << ": " << e.displayText() << "\n" << e.getStackTrace().toString();
return 3;
}
return 0;
}
......@@ -5,8 +5,8 @@
#include <Poco/ConsoleChannel.h>
#include <IO/ReadBufferFromIStream.h>
#include <IO/WriteBufferFromOStream.h>
#include <IO/ReadBufferFromFileDescriptor.h>
#include <IO/WriteBufferFromFileDescriptor.h>
#include <Storages/StorageLog.h>
#include <Storages/System/attachSystemTables.h>
......@@ -42,8 +42,8 @@ try
attachSystemTablesLocal(*context.getDatabase("system"));
context.setCurrentDatabase("default");
ReadBufferFromIStream in(std::cin);
WriteBufferFromOStream out(std::cout);
ReadBufferFromFileDescriptor in(STDIN_FILENO);
WriteBufferFromFileDescriptor out(STDOUT_FILENO);
executeQuery(in, out, /* allow_into_outfile = */ false, context, {});
......
......@@ -7,9 +7,9 @@
#include <IO/WriteHelpers.h>
/** How to test:
* for i in ~/work/ClickHouse/dbms/tests/queries/0_stateless/*.sql; do echo $i; grep -q 'FORMAT' $i || ./lexer < $i || break; done
*/
/// How to test:
/// for i in ~/work/ClickHouse/dbms/tests/queries/0_stateless/*.sql; do echo $i; grep -q 'FORMAT' $i || ./lexer < $i || break; done
///
using namespace DB;
......
......@@ -730,9 +730,9 @@ private:
}
ASTPtr parseQuery(IParser::Pos & pos, const char * end, bool allow_multi_statements)
ASTPtr parseQuery(const char * & pos, const char * end, bool allow_multi_statements)
{
ParserQuery parser;
ParserQuery parser(end);
ASTPtr res;
if (is_interactive)
......
......@@ -9,9 +9,6 @@ target_link_libraries (storage_log dbms)
add_executable (hit_log hit_log.cpp)
target_link_libraries (hit_log dbms)
add_executable (merge_tree merge_tree.cpp)
target_link_libraries (merge_tree dbms)
add_executable (seek_speed_test seek_speed_test.cpp)
target_link_libraries (seek_speed_test dbms)
......
......@@ -2,8 +2,8 @@
#include <list>
#include <iostream>
#include <IO/ReadBufferFromIStream.h>
#include <IO/WriteBufferFromOStream.h>
#include <IO/ReadBufferFromFileDescriptor.h>
#include <IO/WriteBufferFromFileDescriptor.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataTypes/DataTypeString.h>
......@@ -117,7 +117,7 @@ try
/// read the data from tsv file and simultaneously write to table
if (argc == 2 && 0 == strcmp(argv[1], "write"))
{
ReadBufferFromIStream in_buf(std::cin);
ReadBufferFromFileDescriptor in_buf(STDIN_FILENO);
RowInputStreamPtr in_ = std::make_shared<TabSeparatedRowInputStream>(in_buf, sample);
BlockInputStreamFromRowInputStream in(in_, sample, DEFAULT_INSERT_BLOCK_SIZE, 0, 0);
......@@ -128,7 +128,7 @@ try
/// read from it
if (argc == 2 && 0 == strcmp(argv[1], "read"))
{
WriteBufferFromOStream out_buf(std::cout);
WriteBufferFromFileDescriptor out_buf(STDOUT_FILENO);
QueryProcessingStage::Enum stage;
......
#include <iostream>
#include <Storages/StorageMergeTree.h>
#include <DataTypes/DataTypeDate.h>
#include <DataTypes/DataTypeArray.h>
#include <DataTypes/DataTypesNumber.h>
#include <DataStreams/TabSeparatedRowOutputStream.h>
#include <DataStreams/BlockOutputStreamFromRowOutputStream.h>
#include <DataStreams/copyData.h>
#include <Parsers/ExpressionListParsers.h>
#include <Parsers/ParserSelectQuery.h>
#include <Parsers/parseQuery.h>
int main(int argc, char ** argv)
try
{
using namespace DB;
const size_t rows = 12345;
Context context = Context::createGlobal();
/// create a table with a pair of columns
NamesAndTypesListPtr names_and_types = std::make_shared<NamesAndTypesList>();
names_and_types->push_back(NameAndTypePair("d", std::make_shared<DataTypeDate>()));
names_and_types->push_back(NameAndTypePair("a", std::make_shared<DataTypeArray>(std::make_shared<DataTypeUInt32>())));
ASTPtr primary_expr;
Expected expected = "";
String primary_expr_str = "d";
const char * begin = primary_expr_str.data();
const char * end = begin + primary_expr_str.size();
const char * max_parsed_pos = begin;
ParserExpressionList parser(false);
if (!parser.parse(begin, end, primary_expr, max_parsed_pos, expected))
throw Poco::Exception("Cannot parse " + primary_expr_str);
MergeTreeData::MergingParams params;
params.mode = MergeTreeData::MergingParams::Ordinary;
StoragePtr table = StorageMergeTree::create(
"./", "default", "test",
names_and_types, NamesAndTypesList{}, NamesAndTypesList{}, ColumnDefaults{}, false,
context, primary_expr, "d",
ASTPtr{}, 101, params, false, MergeTreeSettings{});
table->startup();
/// write into it
{
Block block;
ColumnWithTypeAndName column1;
column1.name = "d";
column1.type = table->getDataTypeByName("d");
column1.column = column1.type->createColumn();
ColumnUInt16::Container_t & vec1 = typeid_cast<ColumnUInt16 &>(*column1.column).getData();
vec1.resize(rows);
for (size_t i = 0; i < rows; ++i)
vec1[i] = 10000;
block.insert(column1);
ColumnWithTypeAndName column2;
column2.name = "a";
column2.type = table->getDataTypeByName("a");
column2.column = column2.type->createColumn();
for (size_t i = 0; i < rows; ++i)
column2.column->insert(Array((rand() % 10) == 0 ? (rand() % 10) : 0, i));
block.insert(column2);
BlockOutputStreamPtr out = table->write({}, {});
out->write(block);
}
/// read from it
{
Names column_names;
column_names.push_back("d");
column_names.push_back("a");
QueryProcessingStage::Enum stage;
ASTPtr select;
Expected expected = "";
String select_str = "SELECT * FROM test";
const char * begin = select_str.data();
const char * end = begin + select_str.size();
const char * max_parsed_pos = begin;
ParserSelectQuery parser;
if (!parser.parse(begin, end, select, max_parsed_pos, expected))
throw Poco::Exception("Cannot parse " + primary_expr_str);
BlockInputStreamPtr in = table->read(column_names, select, context, stage, 8192, 1)[0];
Block sample;
{
ColumnWithTypeAndName col;
col.type = names_and_types->front().type;
sample.insert(std::move(col));
}
{
ColumnWithTypeAndName col;
col.type = names_and_types->back().type;
sample.insert(std::move(col));
}
WriteBufferFromFileDescriptor out_buf(STDOUT_FILENO);
RowOutputStreamPtr output_ = std::make_shared<TabSeparatedRowOutputStream>(out_buf, sample);
BlockOutputStreamFromRowOutputStream output(output_);
copyData(*in, output);
}
return 0;
}
catch (const DB::Exception & e)
{
std::cerr << e.displayText() << ", stack trace: \n\n" << e.getStackTrace().toString() << std::endl;
throw;
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册