ClickHouse/dbms/Processors/Transforms/ExpressionTransform.h
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

35 lines
937 B
C++

#pragma once
#include <Processors/ISimpleTransform.h>
namespace DB
{
class ExpressionActions;
using ExpressionActionsPtr = std::shared_ptr<ExpressionActions>;
class ExpressionTransform : public ISimpleTransform
{
public:
ExpressionTransform(
const Block & header_,
ExpressionActionsPtr expression_,
bool on_totals_ = false,
bool default_totals_ = false);
String getName() const override { return "ExpressionTransform"; }
protected:
void transform(Chunk & chunk) override;
private:
ExpressionActionsPtr expression;
bool on_totals;
/// This flag means that we have manually added totals to our pipeline.
/// It may happen in case if joined subquery has totals, but out string doesn't.
/// We need to join default values with subquery totals if we have them, or return empty chunk is haven't.
bool default_totals;
bool initialized = false;
};
}