Move dataName.cpp to dateName.h

This commit is contained in:
usurai 2022-01-07 00:11:54 +08:00
parent 5dbf4eae36
commit f919bb8664

View File

@ -1,3 +1,4 @@
#pragma once
#include <Common/DateLUTImpl.h>
#include <Core/DecimalFunctions.h>
@ -65,7 +66,7 @@ public:
bool isVariadic() const override { return true; }
size_t getNumberOfArguments() const override { return 0; }
DataTypePtr getReturnTypeImpl(const ColumnsWithTypeAndName & arguments) const override
virtual DataTypePtr getReturnTypeImpl(const ColumnsWithTypeAndName & arguments) const override
{
if (arguments.size() != 2 && arguments.size() != 3)
throw Exception(
@ -100,7 +101,7 @@ public:
return std::make_shared<DataTypeString>();
}
ColumnPtr executeImpl(
virtual ColumnPtr executeImpl(
const ColumnsWithTypeAndName & arguments,
const DataTypePtr & result_type,
[[maybe_unused]] size_t input_rows_count) const override
@ -112,7 +113,7 @@ public:
|| (res = executeType<DataTypeDateTime64>(arguments, result_type))))
throw Exception(
ErrorCodes::ILLEGAL_COLUMN,
"Illegal column {} of function {], must be Date or DateTime.",
"Illegal column {} of function {}, must be Date or DateTime.",
arguments[1].column->getName(),
getName());
@ -338,7 +339,6 @@ private:
else
throw Exception(ErrorCodes::BAD_ARGUMENTS, "Invalid date part {} for function {}", date_part, getName());
}
};
}