Skip to content

Commit

Permalink
Register lpad/rpad functions for Spark SQL (oap-project#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
lviiii authored and zhejiangxiaomai committed Apr 20, 2023
1 parent 88dfddc commit cb8f366
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions velox/functions/sparksql/Register.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,10 @@ void registerFunctions(const std::string& prefix) {
registerFunction<sparksql::ChrFunction, Varchar, int64_t>({prefix + "chr"});
registerFunction<AsciiFunction, int32_t, Varchar>({prefix + "ascii"});

registerFunction<LPadFunction, Varchar, Varchar, int32_t, Varchar>(
{prefix + "lpad"});
registerFunction<RPadFunction, Varchar, Varchar, int32_t, Varchar>(
{prefix + "rpad"});
registerFunction<SubstrFunction, Varchar, Varchar, int32_t>(
{prefix + "substring"});
registerFunction<SubstrFunction, Varchar, Varchar, int32_t, int32_t>(
Expand Down

0 comments on commit cb8f366

Please sign in to comment.