Skip to content

Commit 7988c5e

Browse files
authored
Refactor spark window function folder (#348)
1 parent 202c2c1 commit 7988c5e

File tree

8 files changed

+8
-75
lines changed

8 files changed

+8
-75
lines changed

velox/functions/sparksql/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ add_subdirectory(window)
5151

5252
if(${VELOX_ENABLE_AGGREGATES})
5353
add_subdirectory(aggregates)
54-
add_subdirectory(windows)
5554
endif()
5655

5756
if(${VELOX_BUILD_TESTING})

velox/functions/sparksql/window/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
add_library(velox_functions_spark_window WindowFunctionsRegistration.cpp)
14+
add_library(velox_functions_spark_window RowNumber.cpp
15+
WindowFunctionsRegistration.cpp)
1516

1617
target_link_libraries(velox_functions_spark_window velox_buffer velox_exec
1718
velox_functions_window Folly::folly)

velox/functions/sparksql/windows/RowNumber.cpp renamed to velox/functions/sparksql/window/RowNumber.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
#include "velox/expression/FunctionSignature.h"
2020
#include "velox/vector/FlatVector.h"
2121

22-
namespace facebook::velox::functions::sparksql::windows {
22+
namespace facebook::velox::functions::window::sparksql {
2323

2424
namespace {
2525

@@ -73,4 +73,4 @@ void registerRowNumber(const std::string& name) {
7373
return std::make_unique<RowNumberFunction>();
7474
});
7575
}
76-
} // namespace facebook::velox::functions::sparksql::windows
76+
} // namespace facebook::velox::functions::window::sparksql

velox/functions/sparksql/windows/RowNumber.h renamed to velox/functions/sparksql/window/RowNumber.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,6 @@
1717

1818
#include <string>
1919

20-
namespace facebook::velox::functions::sparksql::windows {
20+
namespace facebook::velox::functions::window::sparksql {
2121
void registerRowNumber(const std::string& prefix);
22-
} // namespace facebook::velox::functions::sparksql::windows
22+
} // namespace facebook::velox::functions::window::sparksql

velox/functions/sparksql/window/WindowFunctionsRegistration.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,13 @@
1515
*/
1616
#include "velox/functions/sparksql/window/WindowFunctionsRegistration.h"
1717
#include "velox/functions/lib/window/NthValue.h"
18+
#include "velox/functions/sparksql/window/RowNumber.h"
1819

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

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

2527
} // namespace facebook::velox::functions::window::sparksql

velox/functions/sparksql/windows/CMakeLists.txt

Lines changed: 0 additions & 22 deletions
This file was deleted.

velox/functions/sparksql/windows/Register.cpp

Lines changed: 0 additions & 25 deletions
This file was deleted.

velox/functions/sparksql/windows/Register.h

Lines changed: 0 additions & 22 deletions
This file was deleted.

0 commit comments

Comments
 (0)