Skip to content

Commit

Permalink
Revert "Add word_stem Presto function (facebookincubator#9363)"
Browse files Browse the repository at this point in the history
This reverts commit 4797041.
  • Loading branch information
SurbhiVijayvargeeya committed Jun 1, 2024
1 parent ed35a5e commit b0698b1
Show file tree
Hide file tree
Showing 10 changed files with 1 addition and 343 deletions.
1 change: 0 additions & 1 deletion CMake/resolve_dependency_modules/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ by Velox. See details on bundling below.
| wangle | v2024.04.01.00 | No |
| mvfst | v2024.04.01.00 | No |
| fbthrift | v2024.04.01.00 | No |
| libstemmer | 2.2.0 | Yes |
| DuckDB (testing) | 0.8.1 | Yes |
| cpr (testing) | 1.10.15 | Yes |

Expand Down
24 changes: 0 additions & 24 deletions CMake/resolve_dependency_modules/libstemmer/Makefile.patch

This file was deleted.

57 changes: 0 additions & 57 deletions CMake/resolve_dependency_modules/stemmer.cmake

This file was deleted.

3 changes: 0 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -550,9 +550,6 @@ endif()
set_source(xsimd)
resolve_dependency(xsimd 10.0.0)

set(stemmer_SOURCE BUNDLED)
resolve_dependency(stemmer)

if(VELOX_BUILD_TESTING)
set(BUILD_TESTING ON)
include(CTest) # include after project() but before add_subdirectory()
Expand Down
37 changes: 0 additions & 37 deletions velox/docs/functions/presto/string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -255,43 +255,6 @@ String Functions

Converts ``string`` to uppercase.

.. function:: word_stem(word) -> varchar

Returns the stem of ``word`` in the English language. If the ``word`` is not an English word,
the ``word`` in lowercase is returned.

.. function:: word_stem(word, lang) -> varchar

Returns the stem of ``word`` in the ``lang`` language. This function supports the following languages:

=========== ================
lang Language
=========== ================
``ca`` ``Catalan``
``da`` ``Danish``
``de`` ``German``
``en`` ``English``
``es`` ``Spanish``
``eu`` ``Basque``
``fi`` ``Finnish``
``fr`` ``French``
``hu`` ``Hungarian``
``hy`` ``Armenian``
``ir`` ``Irish``
``it`` ``Italian``
``lt`` ``Lithuanian``
``nl`` ``Dutch``
``no`` ``Norwegian``
``pt`` ``Portuguese``
``ro`` ``Romanian``
``ru`` ``Russian``
``sv`` ``Swedish``
``tr`` ``Turkish``
=========== ================

If the specified ``lang`` is not supported, this function throws a user error.


Unicode Functions
-----------------

Expand Down
3 changes: 1 addition & 2 deletions velox/functions/prestosql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,7 @@ target_link_libraries(
velox_type_tz
velox_presto_types
velox_functions_util
Folly::folly
stemmer::stemmer)
Folly::folly)

set_property(TARGET velox_functions_prestosql_impl PROPERTY JOB_POOL_COMPILE
high_memory_pool)
Expand Down
132 changes: 0 additions & 132 deletions velox/functions/prestosql/WordStem.h

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "velox/functions/prestosql/SplitPart.h"
#include "velox/functions/prestosql/SplitToMap.h"
#include "velox/functions/prestosql/StringFunctions.h"
#include "velox/functions/prestosql/WordStem.h"

namespace facebook::velox::functions {

Expand Down Expand Up @@ -131,10 +130,5 @@ void registerStringFunctions(const std::string& prefix) {
{prefix + "strrpos"});
registerFunction<StrRPosFunction, int64_t, Varchar, Varchar, int64_t>(
{prefix + "strrpos"});

// word_stem function
registerFunction<WordStemFunction, Varchar, Varchar>({prefix + "word_stem"});
registerFunction<WordStemFunction, Varchar, Varchar, Varchar>(
{prefix + "word_stem"});
}
} // namespace facebook::velox::functions
1 change: 0 additions & 1 deletion velox/functions/prestosql/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ add_executable(
URLFunctionsTest.cpp
Utf8Test.cpp
WidthBucketArrayTest.cpp
WordStemTest.cpp
ZipTest.cpp
ZipWithTest.cpp)

Expand Down
80 changes: 0 additions & 80 deletions velox/functions/prestosql/tests/WordStemTest.cpp

This file was deleted.

0 comments on commit b0698b1

Please sign in to comment.