mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 08:02:02 +00:00
Fixed build [#METR-2807].
This commit is contained in:
parent
ebe7738c27
commit
7f0654cabb
@ -50,13 +50,13 @@ int main(int argc, char ** argv)
|
||||
Context context;
|
||||
context.getColumns().push_back(NameAndTypePair("number", new DataTypeUInt64));
|
||||
|
||||
ExpressionAnalyzer analyzer(ast, context);
|
||||
ExpressionAnalyzer analyzer(ast, context, context.getColumns());
|
||||
ExpressionActionsChain chain;
|
||||
analyzer.appendSelect(chain, false);
|
||||
analyzer.appendProjectResult(chain, false);
|
||||
chain.finalize();
|
||||
ExpressionActionsPtr expression = chain.getLastActions();
|
||||
|
||||
|
||||
StoragePtr table = StorageSystemNumbers::create("Numbers");
|
||||
|
||||
Names column_names;
|
||||
@ -68,7 +68,7 @@ int main(int argc, char ** argv)
|
||||
in = table->read(column_names, 0, context, Settings(), stage)[0];
|
||||
in = new ExpressionBlockInputStream(in, expression);
|
||||
in = new LimitBlockInputStream(in, 10, std::max(static_cast<Int64>(0), static_cast<Int64>(n) - 10));
|
||||
|
||||
|
||||
WriteBufferFromOStream out1(std::cout);
|
||||
RowOutputStreamPtr out2 = new TabSeparatedRowOutputStream(out1, expression->getSampleBlock());
|
||||
BlockOutputStreamFromRowOutputStream out(out2);
|
||||
|
@ -28,7 +28,7 @@ using Poco::SharedPtr;
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
using namespace DB;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
size_t n = argc == 2 ? parse<UInt64>(argv[1]) : 10ULL;
|
||||
@ -56,13 +56,13 @@ int main(int argc, char ** argv)
|
||||
Context context;
|
||||
context.getColumns().push_back(NameAndTypePair("number", new DataTypeUInt64));
|
||||
|
||||
ExpressionAnalyzer analyzer(ast, context);
|
||||
ExpressionAnalyzer analyzer(ast, context, context.getColumns());
|
||||
ExpressionActionsChain chain;
|
||||
analyzer.appendSelect(chain, false);
|
||||
analyzer.appendProjectResult(chain, false);
|
||||
chain.finalize();
|
||||
ExpressionActionsPtr expression = chain.getLastActions();
|
||||
|
||||
|
||||
StoragePtr table = StorageSystemNumbers::create("Numbers");
|
||||
|
||||
Names column_names;
|
||||
@ -74,7 +74,7 @@ int main(int argc, char ** argv)
|
||||
in = new ExpressionBlockInputStream(in, expression);
|
||||
in = new FilterBlockInputStream(in, 1);
|
||||
in = new LimitBlockInputStream(in, 10, std::max(static_cast<Int64>(0), static_cast<Int64>(n) - 10));
|
||||
|
||||
|
||||
WriteBufferFromOStream ob(std::cout);
|
||||
RowOutputStreamPtr out_ = new TabSeparatedRowOutputStream(ob, expression->getSampleBlock());
|
||||
BlockOutputStreamFromRowOutputStream out(out_);
|
||||
|
@ -125,7 +125,7 @@ int main(int argc, char ** argv)
|
||||
|
||||
/// читаем из неё, применяем выражение, фильтруем, и пишем в tsv виде в консоль
|
||||
|
||||
ExpressionAnalyzer analyzer(ast, context);
|
||||
ExpressionAnalyzer analyzer(ast, context, context.getColumns());
|
||||
ExpressionActionsChain chain;
|
||||
analyzer.appendSelect(chain, false);
|
||||
analyzer.appendWhere(chain, false);
|
||||
|
@ -71,7 +71,7 @@ int main(int argc, char ** argv)
|
||||
Context context;
|
||||
context.getColumns().push_back(NameAndTypePair("number", new DataTypeUInt64));
|
||||
|
||||
ExpressionAnalyzer analyzer(ast, context);
|
||||
ExpressionAnalyzer analyzer(ast, context, context.getColumns());
|
||||
ExpressionActionsChain chain;
|
||||
analyzer.appendSelect(chain, false);
|
||||
analyzer.appendProjectResult(chain, false);
|
||||
|
@ -26,7 +26,7 @@
|
||||
int main(int argc, char ** argv)
|
||||
{
|
||||
using namespace DB;
|
||||
|
||||
|
||||
try
|
||||
{
|
||||
ParserSelectQuery parser;
|
||||
@ -64,8 +64,8 @@ int main(int argc, char ** argv)
|
||||
columns.push_back(NameAndTypePair("s1", new DataTypeString));
|
||||
columns.push_back(NameAndTypePair("s2", new DataTypeString));
|
||||
context.setColumns(columns);
|
||||
|
||||
ExpressionAnalyzer analyzer(ast, context);
|
||||
|
||||
ExpressionAnalyzer analyzer(ast, context, context.getColumns());
|
||||
ExpressionActionsChain chain;
|
||||
analyzer.appendSelect(chain, false);
|
||||
analyzer.appendProjectResult(chain, false);
|
||||
@ -75,7 +75,7 @@ int main(int argc, char ** argv)
|
||||
size_t n = argc == 2 ? atoi(argv[1]) : 10;
|
||||
|
||||
Block block;
|
||||
|
||||
|
||||
ColumnWithNameAndType column_x;
|
||||
column_x.name = "x";
|
||||
column_x.type = new DataTypeInt16;
|
||||
@ -123,7 +123,7 @@ int main(int argc, char ** argv)
|
||||
<< ", " << n * 1000000 / stopwatch.elapsed() << " rows/sec."
|
||||
<< std::endl;
|
||||
}
|
||||
|
||||
|
||||
OneBlockInputStream * is = new OneBlockInputStream(block);
|
||||
LimitBlockInputStream lis(is, 20, std::max(0, static_cast<int>(n) - 20));
|
||||
WriteBufferFromOStream out_buf(std::cout);
|
||||
|
Loading…
Reference in New Issue
Block a user