ClickHouse/src/Functions/formatReadableSize.cpp

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
450 B
C++
Raw Normal View History

#include <Functions/FunctionFactory.h>
#include <Functions/formatReadable.h>
namespace DB
{
namespace
{
struct Impl
{
static constexpr auto name = "formatReadableSize";
static void format(double value, DB::WriteBuffer & out)
{
formatReadableSizeWithBinarySuffix(value, out);
}
};
}
REGISTER_FUNCTION(FormatReadableSize)
{
factory.registerFunction<FunctionFormatReadable<Impl>>();
}
}