Skip to content

Commit

Permalink
Refactor spark window function folder (#348)
Browse files Browse the repository at this point in the history
  • Loading branch information
zhli1142015 authored and zhejiangxiaomai committed Jul 4, 2023
1 parent 43697df commit 78e96ff
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 75 deletions.
1 change: 0 additions & 1 deletion velox/functions/sparksql/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ add_subdirectory(window)

if(${VELOX_ENABLE_AGGREGATES})
add_subdirectory(aggregates)
add_subdirectory(windows)
endif()

if(${VELOX_BUILD_TESTING})
Expand Down
3 changes: 2 additions & 1 deletion velox/functions/sparksql/window/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
add_library(velox_functions_spark_window WindowFunctionsRegistration.cpp)
add_library(velox_functions_spark_window RowNumber.cpp
WindowFunctionsRegistration.cpp)

target_link_libraries(velox_functions_spark_window velox_buffer velox_exec
velox_functions_window Folly::folly)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#include "velox/expression/FunctionSignature.h"
#include "velox/vector/FlatVector.h"

namespace facebook::velox::functions::sparksql::windows {
namespace facebook::velox::functions::window::sparksql {

namespace {

Expand Down Expand Up @@ -73,4 +73,4 @@ void registerRowNumber(const std::string& name) {
return std::make_unique<RowNumberFunction>();
});
}
} // namespace facebook::velox::functions::sparksql::windows
} // namespace facebook::velox::functions::window::sparksql
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@

#include <string>

namespace facebook::velox::functions::sparksql::windows {
namespace facebook::velox::functions::window::sparksql {
void registerRowNumber(const std::string& prefix);
} // namespace facebook::velox::functions::sparksql::windows
} // namespace facebook::velox::functions::window::sparksql
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
*/
#include "velox/functions/sparksql/window/WindowFunctionsRegistration.h"
#include "velox/functions/lib/window/NthValue.h"
#include "velox/functions/sparksql/window/RowNumber.h"

namespace facebook::velox::functions::window::sparksql {

void registerWindowFunctions(const std::string& prefix) {
functions::window::registerIntegerNthValue(prefix + "nth_value");
registerRowNumber(prefix + "row_number");
}

} // namespace facebook::velox::functions::window::sparksql
22 changes: 0 additions & 22 deletions velox/functions/sparksql/windows/CMakeLists.txt

This file was deleted.

25 changes: 0 additions & 25 deletions velox/functions/sparksql/windows/Register.cpp

This file was deleted.

22 changes: 0 additions & 22 deletions velox/functions/sparksql/windows/Register.h

This file was deleted.

0 comments on commit 78e96ff

Please sign in to comment.