Skip to content

Commit

Permalink
Register lpad/rpad functions for Spark SQL (facebookincubator#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
lviiii authored and zhejiangxiaomai committed Jan 3, 2023
1 parent d927e5d commit 5a027f1
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 @@ -81,6 +81,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 5a027f1

Please sign in to comment.