Fixed function name and code markup.

This commit is contained in:
Sergei Shtykov 2019-11-26 23:32:27 +03:00
parent 3993d98377
commit b3bdb9126e
2 changed files with 24 additions and 24 deletions

View File

@ -19,12 +19,12 @@ namespace ErrorCodes
extern const int ILLEGAL_COLUMN;
}
class FunctionRandomASKII : public IFunction
class FunctionRandomASCII : public IFunction
{
public:
static constexpr auto name = "randomASKII";
static FunctionPtr create(const Context &){ return std::make_shared<FunctionRandomASKII>(); }
static constexpr auto name = "randomASCII";
static FunctionPtr create(const Context &){ return std::make_shared<FunctionRandomASCII>(); }
String getName() const override
{
@ -92,10 +92,10 @@ private:
}
// for (size_t ch_num = 32; ch_num < 45 ; ++ch_num)
// {
// writeChar(ch_num, buf_to);
// }
// for (size_t ch_num = 32; ch_num < 45 ; ++ch_num)
// {
// writeChar(ch_num, buf_to);
// }
writeChar(0, buf_to);
offsets_to[i] = buf_to.count();
}
@ -103,7 +103,7 @@ private:
buf_to.finish();
block.getByPosition(result).column = std::move(col_to);
// block.getByPosition(result).column = DataTypeString().createColumnConst(col_from->size(), "randomASKII");
// block.getByPosition(result).column = DataTypeString().createColumnConst(col_from->size(), "randomASCII");
return true;
}
@ -112,7 +112,7 @@ private:
// explicit FunctionRandomASKII()
// explicit FunctionRandomASCII()
// {
// }
@ -130,14 +130,14 @@ private:
// void executeImpl(Block & block, const ColumnNumbers &, size_t result, size_t input_rows_count) override
// {
// block.getByPosition(result).column = DataTypeString().createColumnConst(input_rows_count, "randomASKII");
// block.getByPosition(result).column = DataTypeString().createColumnConst(input_rows_count, "randomASCII");
// }
};
void registerFunctionRandomASKII(FunctionFactory & factory)
void registerFunctionRandomASCII(FunctionFactory & factory)
{
factory.registerFunction<FunctionRandomASKII>();
factory.registerFunction<FunctionRandomASCII>();
}
}

View File

@ -52,7 +52,7 @@ void registerFunctionEvalMLMethod(FunctionFactory &);
void registerFunctionBasename(FunctionFactory &);
void registerFunctionTransform(FunctionFactory &);
void registerFunctionGetMacro(FunctionFactory &);
void registerFunctionRandomASKII(FunctionFactory &);
void registerFunctionRandomASCII(FunctionFactory &);
void registerFunctionGetScalar(FunctionFactory &);
#if USE_ICU
@ -108,7 +108,7 @@ void registerFunctionsMiscellaneous(FunctionFactory & factory)
registerFunctionBasename(factory);
registerFunctionTransform(factory);
registerFunctionGetMacro(factory);
registerFunctionRandomASKII(factory);
registerFunctionRandomASCII(factory);
registerFunctionGetScalar(factory);
#if USE_ICU