mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Fix build
This commit is contained in:
parent
ad4fd75fb4
commit
9411d496d9
@ -6,34 +6,31 @@
|
||||
|
||||
namespace DB
|
||||
{
|
||||
namespace
|
||||
|
||||
/// Get the connection ID. It's used for MySQL handler only.
|
||||
class FunctionConnectionID : public IFunction
|
||||
{
|
||||
/// Get the connection ID. It's used for MySQL handler only.
|
||||
class FunctionConnectionID : public IFunction
|
||||
public:
|
||||
static constexpr auto name = "connectionID";
|
||||
|
||||
explicit FunctionConnectionID(const Context & context_) : context(context_) {}
|
||||
|
||||
static FunctionPtr create(const Context & context) { return std::make_shared<FunctionConnectionID>(context); }
|
||||
|
||||
String getName() const override { return name; }
|
||||
|
||||
size_t getNumberOfArguments() const override { return 0; }
|
||||
|
||||
DataTypePtr getReturnTypeImpl(const DataTypes & /*arguments*/) const override { return std::make_shared<DataTypeUInt64>(); }
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName &, const DataTypePtr & result_type, size_t input_rows_count) const override
|
||||
{
|
||||
public:
|
||||
static constexpr auto name = "connectionID";
|
||||
return result_type->createColumnConst(input_rows_count, context.getClientInfo().connection_id);
|
||||
}
|
||||
|
||||
FunctionConnectionID(const Context & context_) : context(context_) {}
|
||||
|
||||
static FunctionPtr create(const Context & context) { return std::make_shared<FunctionConnectionID>(context); }
|
||||
|
||||
String getName() const override { return name; }
|
||||
|
||||
size_t getNumberOfArguments() const override { return 0; }
|
||||
|
||||
DataTypePtr getReturnTypeImpl(const DataTypes & /*arguments*/) const override { return std::make_shared<DataTypeUInt64>(); }
|
||||
|
||||
ColumnPtr executeImpl(const ColumnsWithTypeAndName &, const DataTypePtr & result_type, size_t input_rows_count) const override
|
||||
{
|
||||
return result_type->createColumnConst(input_rows_count, context.getClientInfo().connection_id);
|
||||
}
|
||||
|
||||
private:
|
||||
const Context & context;
|
||||
};
|
||||
|
||||
}
|
||||
private:
|
||||
const Context & context;
|
||||
};
|
||||
|
||||
void registerFunctionConnectionID(FunctionFactory & factory)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user