Skip to content

refactor(exec): Move window files under exec/window#17710

Closed
zhli1142015 wants to merge 1 commit into
facebookincubator:mainfrom
zhli1142015:move-window-files-to-exec-window
Closed

refactor(exec): Move window files under exec/window#17710
zhli1142015 wants to merge 1 commit into
facebookincubator:mainfrom
zhli1142015:move-window-files-to-exec-window

Conversation

@zhli1142015
Copy link
Copy Markdown
Contributor

@zhli1142015 zhli1142015 commented Jun 3, 2026

Preparatory, mechanical refactor for #17558. The window subsystem lived as a flat set of files under velox/exec/. This moves the internal implementation files into a dedicated velox/exec/window/ directory and facebook::velox::exec::window namespace, while keeping the public-facing files in velox/exec/ and the facebook::velox::exec namespace.

Stay in velox/exec/ (exec namespace):

  • Window.h/.cpp — the operator itself, alongside HashJoin, Aggregate, and TableScan.
  • WindowFunction.h/.cpp — the public API that window function authors implement against, like AggregateFunction.h.

Move under velox/exec/window/ (exec::window namespace):

  • WindowBuild and its variants, WindowPartition, AggregateWindow, KRangeFrameBound, PeerGroupComputation, WindowPartitionAccessor — internal implementation details.

There are no behavior changes; only file locations, the enclosing namespace of the internal files, and references to them change. The operator and the public API reference the internal types through the window:: namespace.

@zhli1142015 zhli1142015 requested a review from majetideepak as a code owner June 3, 2026 04:28
@netlify
Copy link
Copy Markdown

netlify Bot commented Jun 3, 2026

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit e89c26d
🔍 Latest deploy log https://app.netlify.com/projects/meta-velox/deploys/6a2023dfd5ebf10008cc3f40

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jun 3, 2026
@github-actions
Copy link
Copy Markdown

github-actions Bot commented Jun 3, 2026

Build Impact Analysis

Selective Build Targets (building these covers all 317 affected)

cmake --build _build/release --target aggregate_companion_functions_test physical_size_aggregator_test presto_sql_test spark_aggregation_fuzzer_test spark_expression_fuzzer_test velox_abfs_test velox_aggregates_GeometryAggregateTest velox_aggregates_reduce_agg_bm velox_aggregates_simple_aggregates_bm velox_aggregates_string_keys_bm velox_aggregates_test_group0 velox_aggregates_test_group1 velox_aggregates_test_group2 velox_aggregates_test_group3 velox_aggregates_test_group4 velox_aggregation_fuzzer_test velox_aggregation_runner_test velox_benchmark_array_writer_no_nulls velox_benchmark_array_writer_with_nulls velox_benchmark_basic_comparison_conjunct velox_benchmark_basic_decoded_vector velox_benchmark_basic_preproc velox_benchmark_basic_selectivity_vector velox_benchmark_basic_simple_arithmetic velox_benchmark_basic_simple_cast velox_benchmark_basic_vector_compare velox_benchmark_basic_vector_fuzzer velox_benchmark_basic_vector_slice velox_benchmark_estimate_flat_size velox_benchmark_expr_flat_no_nulls velox_benchmark_feature_normalization velox_benchmark_map_writer_no_nulls velox_benchmark_map_writer_with_nulls velox_benchmark_nested_array_writer_no_nulls velox_benchmark_nested_array_writer_with_nulls velox_cache_fuzzer velox_cast_benchmark velox_common_test velox_core_plan_consistency_checker_test velox_core_test velox_date_extract_benchmark velox_driver_test velox_duckdb_conversion_test velox_dwio_cache_test velox_dwio_common_test velox_dwio_dwrf_buffered_output_stream_test velox_dwio_dwrf_byte_rle_encoder_test velox_dwio_dwrf_byte_rle_test velox_dwio_dwrf_checksum_test velox_dwio_dwrf_column_reader_test velox_dwio_dwrf_column_statistics_test velox_dwio_dwrf_compression_test velox_dwio_dwrf_config_test velox_dwio_dwrf_data_buffer_holder_test velox_dwio_dwrf_decompression_test velox_dwio_dwrf_decryption_test velox_dwio_dwrf_dictionary_encoder_test velox_dwio_dwrf_dictionary_encoding_utils_test velox_dwio_dwrf_encoding_selector_test velox_dwio_dwrf_encryption_test velox_dwio_dwrf_flush_policy_test velox_dwio_dwrf_index_builder_test velox_dwio_dwrf_int_direct_test velox_dwio_dwrf_int_encoder_test velox_dwio_dwrf_layout_planner_test velox_dwio_dwrf_ratio_checker_test velox_dwio_dwrf_reader_base_test velox_dwio_dwrf_reader_test velox_dwio_dwrf_rle_test velox_dwio_dwrf_rlev1_encoder_test velox_dwio_dwrf_stream_labels_test velox_dwio_dwrf_stripe_dictionary_cache_test velox_dwio_dwrf_stripe_reader_base_test velox_dwio_dwrf_stripe_stream_test velox_dwio_dwrf_writer_context_test velox_dwio_dwrf_writer_encoding_manager_test velox_dwio_dwrf_writer_sink_test velox_dwio_dwrf_writer_test velox_dwio_iceberg_reader_benchmark velox_dwio_orc_column_statistics_test velox_dwio_orc_reader_filter_test velox_dwio_orc_reader_test velox_dwio_parquet_common_test velox_dwio_parquet_page_reader_test velox_dwio_parquet_reader_benchmark velox_dwio_parquet_reader_test velox_dwio_parquet_rlebp_decoder_test velox_dwio_parquet_structure_decoder_test velox_dwio_parquet_table_scan_test velox_dwio_parquet_tpch_test velox_dwrf_column_writer_index_test velox_dwrf_column_writer_stats_test velox_dwrf_column_writer_test velox_dwrf_e2e_filter_test velox_dwrf_e2e_reader_test velox_dwrf_e2e_writer_test velox_dwrf_float_column_writer_benchmark velox_dwrf_statistics_builder_utils_test velox_dwrf_writer_extended_test velox_dwrf_writer_flush_test velox_example_operator_extensibility velox_example_scan_orc velox_exchange_benchmark velox_exchange_fuzzer velox_exec_SpatialJoinTest velox_exec_bm_duplicate_project velox_exec_infra_test velox_exec_test_group0 velox_exec_test_group1 velox_exec_test_group2 velox_exec_test_group3 velox_exec_test_group4 velox_exec_test_group5 velox_exec_test_group6 velox_exec_test_group7 velox_exec_test_group8 velox_exec_util_test_group0 velox_exec_vector_hasher_benchmark velox_expression_fuzzer_test velox_expression_fuzzer_unit_test velox_expression_runner_test velox_expression_runner_unit_test velox_expression_test velox_expression_verifier_unit_test velox_filemetadata_test velox_filter_project_benchmark velox_format_datetime_benchmark velox_function_dynamic_link_test velox_function_registry_test velox_functions_aggregates_test velox_functions_benchmarks_compare velox_functions_benchmarks_row_writer_no_nulls velox_functions_benchmarks_simdjson_function_with_expr velox_functions_benchmarks_string_writer_no_nulls velox_functions_benchmarks_url velox_functions_iceberg_test velox_functions_lib_test velox_functions_prestosql_benchmarks_array_contains velox_functions_prestosql_benchmarks_array_min_max velox_functions_prestosql_benchmarks_array_position velox_functions_prestosql_benchmarks_array_sum velox_functions_prestosql_benchmarks_bitwise velox_functions_prestosql_benchmarks_cardinality velox_functions_prestosql_benchmarks_comparisons velox_functions_prestosql_benchmarks_concat velox_functions_prestosql_benchmarks_date_time velox_functions_prestosql_benchmarks_field_reference velox_functions_prestosql_benchmarks_generic velox_functions_prestosql_benchmarks_in velox_functions_prestosql_benchmarks_map_concat velox_functions_prestosql_benchmarks_map_except velox_functions_prestosql_benchmarks_map_input velox_functions_prestosql_benchmarks_map_intersect velox_functions_prestosql_benchmarks_map_subscript velox_functions_prestosql_benchmarks_map_zip_with velox_functions_prestosql_benchmarks_not velox_functions_prestosql_benchmarks_regexp_replace velox_functions_prestosql_benchmarks_row velox_functions_prestosql_benchmarks_string_ascii_utf_functions velox_functions_prestosql_benchmarks_uuid_cast velox_functions_prestosql_benchmarks_width_bucket velox_functions_prestosql_benchmarks_zip velox_functions_prestosql_benchmarks_zip_with velox_functions_spark_aggregates_test velox_functions_spark_test velox_functions_test velox_fuzzer_connector_test velox_gcs_file_test velox_gcs_insert_test velox_gcs_multiendpoints_test velox_gcsfile_example velox_hash_benchmark velox_hash_join_build_benchmark velox_hash_join_list_result_benchmark velox_hash_join_prepare_join_table_benchmark velox_hdfs_file_test velox_hdfs_insert_test velox_hive_connector_test velox_hive_iceberg_deletion_vector_test velox_hive_iceberg_deletion_vector_writer_test velox_hive_iceberg_dwrf_insert_test velox_hive_iceberg_equality_delete_test velox_hive_iceberg_insert_test velox_hive_iceberg_test velox_hive_paimon_connector velox_hive_paimon_data_file_meta_test velox_hive_paimon_deletion_file_test velox_hive_paimon_row_kind_test velox_hive_paimon_split_test velox_hive_partition_function_benchmark velox_hive_writer_options_adapter_test velox_in_10_min_demo velox_join_fuzzer velox_key_encoder_test velox_like_benchmark velox_like_tpch_benchmark velox_mark_distinct_fuzzer velox_mark_sorted_benchmark velox_memory_arbitration_fuzzer velox_memory_test velox_merge_benchmark velox_numeric_upcast_benchmark velox_orderby_benchmark velox_parquet_e2e_filter_test velox_parquet_writer_sink_test velox_parquet_writer_test velox_parse_test velox_prefixsort_benchmark velox_presto_types_fuzzer_utils_test velox_prestosql_coverage velox_query_replayer velox_re2_functions_benchmarks velox_row_number_fuzzer velox_rpc_operator_test velox_s3file_test velox_s3insert_test velox_s3metrics_test velox_s3multiendpoints_test velox_s3read_test velox_s3registration_test velox_serializer_test_group0 velox_simple_aggregate_test velox_sort_benchmark velox_spark_query_runner_test velox_spark_windows_test velox_sparksql_benchmarks_cast velox_sparksql_benchmarks_compare velox_sparksql_benchmarks_from_json velox_sparksql_benchmarks_get_funcs velox_sparksql_benchmarks_hash velox_sparksql_benchmarks_in velox_sparksql_benchmarks_simd_compare velox_sparksql_benchmarks_split velox_sparksql_coverage velox_spatial_join_benchmark velox_spatial_join_fuzzer velox_spiller_aggregate_benchmark velox_spiller_join_benchmark velox_streaming_aggregation_benchmark velox_table_evolution_fuzzer_test velox_test_util_test velox_text_reader_test velox_text_writer_test velox_tool_trace_test velox_topn_row_number_fuzzer velox_tpcds_benchmark velox_tpcds_connector_test velox_tpch_benchmark velox_tpch_connector_test velox_tpch_speed_test velox_trace_file_tool velox_unsafe_row_serialize_benchmark velox_wave_benchmark velox_wave_exec_test velox_window_fuzzer_test velox_window_prefixsort_benchmark velox_window_sub_partitioned_sort_benchmark velox_windows_agg_test velox_windows_rank_test velox_windows_value_test velox_writer_fuzzer_test

Total affected: 317/581 targets

Warning: 2 file(s) could not be mapped to any target. A full build may be needed.

  • velox/exec/CMakeLists.txt
  • velox/exec/window/CMakeLists.txt
Affected targets (317)

Directly changed (3)

Target Changed Files
velox_exec Aggregate.cpp, AggregateWindow.h, KRangeFrameBound.h, PartitionStreamingWindowBuild.h, PeerGroupComputation.h, ... (+8 more)
velox_exec_test_group4 RowsStreamingWindowBuild.h, SortWindowBuild.h, Window.h, WindowBuild.h, WindowTest.cpp
velox_exec_window AggregateWindow.cpp, AggregateWindow.h, KRangeFrameBound.h, PartitionStreamingWindowBuild.cpp, PartitionStreamingWindowBuild.h, ... (+11 more)

Transitively affected (314)

  • aggregate_companion_functions_test
  • physical_size_aggregator_test
  • presto_sql_test
  • spark_aggregation_fuzzer_test
  • spark_expression_fuzzer_test
  • velox_abfs_test
  • velox_aggregates
  • velox_aggregates_GeometryAggregateTest
  • velox_aggregates_reduce_agg_bm
  • velox_aggregates_simple_aggregates_bm
  • velox_aggregates_string_keys_bm
  • velox_aggregates_test_group0
  • velox_aggregates_test_group1
  • velox_aggregates_test_group2
  • velox_aggregates_test_group3
  • velox_aggregates_test_group4
  • velox_aggregation_fuzzer
  • velox_aggregation_fuzzer_base
  • velox_aggregation_fuzzer_test
  • velox_aggregation_result_verifier
  • velox_aggregation_runner_test
  • velox_benchmark_array_writer_no_nulls
  • velox_benchmark_array_writer_with_nulls
  • velox_benchmark_basic_comparison_conjunct
  • velox_benchmark_basic_decoded_vector
  • velox_benchmark_basic_preproc
  • velox_benchmark_basic_selectivity_vector
  • velox_benchmark_basic_simple_arithmetic
  • velox_benchmark_basic_simple_cast
  • velox_benchmark_basic_vector_compare
  • velox_benchmark_basic_vector_fuzzer
  • velox_benchmark_basic_vector_slice
  • velox_benchmark_builder
  • velox_benchmark_estimate_flat_size
  • velox_benchmark_expr_flat_no_nulls
  • velox_benchmark_feature_normalization
  • velox_benchmark_map_writer_no_nulls
  • velox_benchmark_map_writer_with_nulls
  • velox_benchmark_nested_array_writer_no_nulls
  • velox_benchmark_nested_array_writer_with_nulls
  • velox_cache_fuzzer
  • velox_cast_benchmark
  • velox_common_test
  • velox_core_plan_consistency_checker_test
  • velox_core_test
  • velox_date_extract_benchmark
  • velox_driver_test
  • velox_duckdb_conversion_test
  • velox_duckdb_parser
  • velox_dwio_arrow_parquet_writer
  • velox_dwio_cache_test
  • velox_dwio_common_test
  • velox_dwio_common_test_utils
  • velox_dwio_dwrf_buffered_output_stream_test
  • velox_dwio_dwrf_byte_rle_encoder_test
  • velox_dwio_dwrf_byte_rle_test
  • velox_dwio_dwrf_checksum_test
  • velox_dwio_dwrf_column_reader_test
  • velox_dwio_dwrf_column_statistics_test
  • velox_dwio_dwrf_compression_test
  • velox_dwio_dwrf_config_test
  • velox_dwio_dwrf_data_buffer_holder_test
  • velox_dwio_dwrf_decompression_test
  • velox_dwio_dwrf_decryption_test
  • velox_dwio_dwrf_dictionary_encoder_test
  • velox_dwio_dwrf_dictionary_encoding_utils_test
  • velox_dwio_dwrf_encoding_selector_test
  • velox_dwio_dwrf_encryption_test
  • velox_dwio_dwrf_flush_policy_test
  • velox_dwio_dwrf_index_builder_test
  • velox_dwio_dwrf_int_direct_test
  • velox_dwio_dwrf_int_encoder_test
  • velox_dwio_dwrf_layout_planner_test
  • velox_dwio_dwrf_ratio_checker_test
  • velox_dwio_dwrf_reader_base_test
  • velox_dwio_dwrf_reader_test
  • velox_dwio_dwrf_rle_test
  • velox_dwio_dwrf_rlev1_encoder_test
  • velox_dwio_dwrf_stream_labels_test
  • velox_dwio_dwrf_stripe_dictionary_cache_test
  • velox_dwio_dwrf_stripe_reader_base_test
  • velox_dwio_dwrf_stripe_stream_test
  • velox_dwio_dwrf_writer
  • velox_dwio_dwrf_writer_context_test
  • velox_dwio_dwrf_writer_encoding_manager_test
  • velox_dwio_dwrf_writer_sink_test
  • velox_dwio_dwrf_writer_test
  • velox_dwio_iceberg_reader_benchmark
  • velox_dwio_iceberg_reader_benchmark_lib
  • velox_dwio_orc_column_statistics_test
  • velox_dwio_orc_reader_filter_test
  • velox_dwio_orc_reader_test
  • velox_dwio_parquet_common_test
  • velox_dwio_parquet_page_reader_test
  • velox_dwio_parquet_reader_benchmark
  • velox_dwio_parquet_reader_benchmark_lib
  • velox_dwio_parquet_reader_test
  • velox_dwio_parquet_rlebp_decoder_test
  • velox_dwio_parquet_structure_decoder_test
  • velox_dwio_parquet_table_scan_test
  • velox_dwio_parquet_tpch_test
  • velox_dwio_parquet_writer
  • velox_dwrf_column_writer_index_test
  • velox_dwrf_column_writer_stats_test
  • velox_dwrf_column_writer_test
  • velox_dwrf_e2e_filter_test
  • velox_dwrf_e2e_reader_test
  • velox_dwrf_e2e_writer_test
  • velox_dwrf_float_column_writer_benchmark
  • velox_dwrf_statistics_builder_utils_test
  • velox_dwrf_test_utils
  • velox_dwrf_writer_extended_test
  • velox_dwrf_writer_flush_test
  • velox_example_operator_extensibility
  • velox_example_scan_orc
  • velox_exchange_benchmark
  • velox_exchange_fuzzer
  • velox_exec_SpatialJoinTest
  • velox_exec_bm_duplicate_project
  • velox_exec_infra_test
  • velox_exec_test_group0
  • velox_exec_test_group1
  • velox_exec_test_group2
  • velox_exec_test_group3
  • velox_exec_test_group5
  • velox_exec_test_group6
  • velox_exec_test_group7
  • velox_exec_test_group8
  • velox_exec_test_lib
  • velox_exec_util_test_group0
  • velox_exec_vector_hasher_benchmark
  • velox_expression_fuzzer
  • velox_expression_fuzzer_test
  • velox_expression_fuzzer_unit_test
  • velox_expression_runner
  • velox_expression_runner_test
  • velox_expression_runner_unit_test
  • velox_expression_test
  • velox_expression_test_utility
  • velox_expression_verifier
  • velox_expression_verifier_unit_test
  • velox_filemetadata_test
  • velox_filter_project_benchmark
  • velox_format_datetime_benchmark
  • velox_function_dynamic_link_test
  • velox_function_registry_test
  • velox_functions_aggregates
  • velox_functions_aggregates_test
  • velox_functions_aggregates_test_lib
  • velox_functions_benchmarks_compare
  • velox_functions_benchmarks_row_writer_no_nulls
  • velox_functions_benchmarks_simdjson_function_with_expr
  • velox_functions_benchmarks_string_writer_no_nulls
  • velox_functions_benchmarks_url
  • velox_functions_iceberg_test
  • velox_functions_lib_test
  • velox_functions_prestosql_benchmarks_array_contains
  • velox_functions_prestosql_benchmarks_array_min_max
  • velox_functions_prestosql_benchmarks_array_position
  • velox_functions_prestosql_benchmarks_array_sum
  • velox_functions_prestosql_benchmarks_bitwise
  • velox_functions_prestosql_benchmarks_cardinality
  • velox_functions_prestosql_benchmarks_comparisons
  • velox_functions_prestosql_benchmarks_concat
  • velox_functions_prestosql_benchmarks_date_time
  • velox_functions_prestosql_benchmarks_field_reference
  • velox_functions_prestosql_benchmarks_generic
  • velox_functions_prestosql_benchmarks_in
  • velox_functions_prestosql_benchmarks_map_concat
  • velox_functions_prestosql_benchmarks_map_except
  • velox_functions_prestosql_benchmarks_map_input
  • velox_functions_prestosql_benchmarks_map_intersect
  • velox_functions_prestosql_benchmarks_map_subscript
  • velox_functions_prestosql_benchmarks_map_zip_with
  • velox_functions_prestosql_benchmarks_not
  • velox_functions_prestosql_benchmarks_regexp_replace
  • velox_functions_prestosql_benchmarks_row
  • velox_functions_prestosql_benchmarks_string_ascii_utf_functions
  • velox_functions_prestosql_benchmarks_uuid_cast
  • velox_functions_prestosql_benchmarks_width_bucket
  • velox_functions_prestosql_benchmarks_zip
  • velox_functions_prestosql_benchmarks_zip_with
  • velox_functions_spark_aggregates
  • velox_functions_spark_aggregates_test
  • velox_functions_spark_test
  • velox_functions_spark_window
  • velox_functions_test
  • velox_functions_test_lib
  • velox_functions_window
  • velox_functions_window_test_lib
  • velox_fuzzer_connector_test
  • velox_fuzzer_util
  • velox_gcs_file_test
  • velox_gcs_insert_test
  • velox_gcs_multiendpoints_test
  • velox_gcsfile_example
  • velox_hash_benchmark
  • velox_hash_join_build_benchmark
  • velox_hash_join_list_result_benchmark
  • velox_hash_join_prepare_join_table_benchmark
  • velox_hdfs_file_test
  • velox_hdfs_insert_test
  • velox_hive_connector
  • velox_hive_connector_test
  • velox_hive_iceberg_deletion_vector_test
  • velox_hive_iceberg_deletion_vector_writer_test
  • velox_hive_iceberg_dwrf_insert_test
  • velox_hive_iceberg_equality_delete_test
  • velox_hive_iceberg_insert_test
  • velox_hive_iceberg_splitreader
  • velox_hive_iceberg_test
  • velox_hive_paimon_connector
  • velox_hive_paimon_data_file_meta_test
  • velox_hive_paimon_deletion_file_test
  • velox_hive_paimon_row_kind_test
  • velox_hive_paimon_split
  • velox_hive_paimon_split_test
  • velox_hive_partition_function
  • velox_hive_partition_function_benchmark
  • velox_hive_writer_options_adapter_test
  • velox_in_10_min_demo
  • velox_join_fuzzer
  • velox_key_encoder_test
  • velox_like_benchmark
  • velox_like_tpch_benchmark
  • velox_mark_distinct_fuzzer
  • velox_mark_distinct_fuzzer_lib
  • velox_mark_sorted_benchmark
  • velox_memory_arbitration_fuzzer
  • velox_memory_test
  • velox_merge_benchmark
  • velox_numeric_upcast_benchmark
  • velox_orderby_benchmark
  • velox_parquet_e2e_filter_test
  • velox_parquet_writer_sink_test
  • velox_parquet_writer_test
  • velox_parse_expression
  • velox_parse_parser
  • velox_parse_test
  • velox_parse_utils
  • velox_prefixsort_benchmark
  • velox_presto_types_fuzzer_utils_test
  • velox_prestosql_coverage
  • velox_query_benchmark
  • velox_query_replayer
  • velox_query_trace_replayer_base
  • velox_re2_functions_benchmarks
  • velox_row_number_fuzzer
  • velox_row_number_fuzzer_lib
  • velox_rpc_operator
  • velox_rpc_operator_test
  • velox_rpc_plan_node_translator
  • velox_s3file_test
  • velox_s3insert_test
  • velox_s3metrics_test
  • velox_s3multiendpoints_test
  • velox_s3read_test
  • velox_s3registration_test
  • velox_serializer_test_group0
  • velox_simple_aggregate
  • velox_simple_aggregate_test
  • velox_sort_benchmark
  • velox_spark_query_runner
  • velox_spark_query_runner_test
  • velox_spark_windows_test
  • velox_sparksql_benchmarks_cast
  • velox_sparksql_benchmarks_compare
  • velox_sparksql_benchmarks_from_json
  • velox_sparksql_benchmarks_get_funcs
  • velox_sparksql_benchmarks_hash
  • velox_sparksql_benchmarks_in
  • velox_sparksql_benchmarks_simd_compare
  • velox_sparksql_benchmarks_split
  • velox_sparksql_coverage
  • velox_spatial_join_benchmark
  • velox_spatial_join_fuzzer
  • velox_spill_fuzzer_base_lib
  • velox_spiller_aggregate_benchmark
  • velox_spiller_aggregate_benchmark_base
  • velox_spiller_join_benchmark
  • velox_spiller_join_benchmark_base
  • velox_streaming_aggregation_benchmark
  • velox_table_evolution_fuzzer_test
  • velox_test_util_test
  • velox_text_reader_test
  • velox_text_writer_test
  • velox_tool_trace_test
  • velox_topn_row_number_fuzzer
  • velox_topn_row_number_fuzzer_lib
  • velox_tpcds_benchmark
  • velox_tpcds_benchmark_lib
  • velox_tpcds_connector_test
  • velox_tpch_benchmark
  • velox_tpch_benchmark_lib
  • velox_tpch_connector
  • velox_tpch_connector_test
  • velox_tpch_speed_test
  • velox_trace_file_tool
  • velox_trace_file_tool_base
  • velox_unsafe_row_serialize_benchmark
  • velox_wave_benchmark
  • velox_wave_exec
  • velox_wave_exec_test
  • velox_wave_mock_reader
  • velox_window
  • velox_window_fuzzer
  • velox_window_fuzzer_test
  • velox_window_prefixsort_benchmark
  • velox_window_sub_partitioned_sort_benchmark
  • velox_windows_agg_test
  • velox_windows_rank_test
  • velox_windows_value_test
  • velox_writer_fuzzer
  • velox_writer_fuzzer_test

Slow path • Graph generated from PR branch

Copy link
Copy Markdown
Contributor

@mbasmanova mbasmanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the quick turnaround!

  • Consider keeping public-facing files in exec/ and exec namespace — only move implementation details into exec/window/:
    • Window.h/.cpp — the operator itself. Other operators (HashJoin, Aggregate, TableScan) live in exec/.
    • WindowFunction.h/.cpp — the public API that window function authors implement against. Similar to AggregateFunction.h which lives in exec/.
    • The rest (WindowBuild, WindowPartition, PeerGroupComputation, KRangeFrameBound, etc.) are internal implementation details — these belong in exec/window/.

@zhli1142015 zhli1142015 force-pushed the move-window-files-to-exec-window branch from 710faa0 to 55c53f8 Compare June 3, 2026 11:16
@zhli1142015
Copy link
Copy Markdown
Contributor Author

Thank you, @mbasmanova, this makes a lot of sense! I've updated the PR accordingly:

  • Window.h/.cpp (the operator) and WindowFunction.h/.cpp (the public API window function authors implement against) now stay in velox/exec/ and the facebook::velox::exec namespace.
  • Only the internal implementation details (WindowBuild and its variants, WindowPartition, AggregateWindow, KRangeFrameBound, PeerGroupComputation, WindowPartitionAccessor) moved under velox/exec/window/ / facebook::velox::exec::window.

The operator and public API reference the internal types through the window:: namespace. All window tests pass locally. Could you please take another look when you have a moment? Thanks again!

Copy link
Copy Markdown
Contributor

@mbasmanova mbasmanova left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the updates!

  • WindowPartition.h is also part of the public API — every window function implementation uses it (FirstLastValue, LeadLag, Rank, Ntile, etc.). Keep it in exec/ alongside Window.h and WindowFunction.h.
  • There should be no changes outside exec/ at all. Public APIs (Window, WindowFunction, WindowPartition) stay in exec/ — same files, same namespace, same include paths. Only internal implementation details move.

@mbasmanova mbasmanova added the ready-to-merge PR that have been reviewed and are ready for merging. PRs with this tag notify the Velox Meta oncall label Jun 3, 2026
@zhli1142015 zhli1142015 force-pushed the move-window-files-to-exec-window branch from 55c53f8 to 5ad74d9 Compare June 3, 2026 12:15
@zhli1142015
Copy link
Copy Markdown
Contributor Author

Thanks for the review and approval, @mbasmanova! I've updated the PR accordingly: Window, WindowFunction, and WindowPartition now stay in velox/exec/ (namespace facebook::velox::exec) unchanged, and only the internal implementation details (the WindowBuild strategies, the aggregate-as-window adapter, and the frame/peer-group helpers) move under velox/exec/window/ (namespace facebook::velox::exec::window). There are no changes outside velox/exec/. Window unit tests pass locally. Please take another look when you have a moment.

functions::prestosql::registerAllScalarFunctions();
parse::registerTypeResolver();
window::prestosql::registerAllWindowFunctions();
velox::window::prestosql::registerAllWindowFunctions();
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need these changes outside of exec/ dir?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch, thank you! You're right — this one wasn't needed. I've reverted it here and in the other files that don't reference the moved headers (LocalPartitionTest.cpp, WindowFunctionRegistryTest.cpp, and the two window benchmarks); those are now unchanged from main. The only remaining qualification is in WindowTest.cpp, which directly includes the moved exec/window build headers, so within facebook::velox::exec the unqualified window:: now refers to exec::window and has to be spelled velox::window::prestosql explicitly. No files outside velox/exec/ change.

@zhli1142015 zhli1142015 force-pushed the move-window-files-to-exec-window branch from 5ad74d9 to 400f129 Compare June 3, 2026 12:28
The window operator code mixes public API with internal implementation
details in velox/exec/. Window, WindowFunction, and WindowPartition are
the public API used by window function implementations; the build
strategies, aggregate-as-window adapter, and frame/peer-group helpers are
internal to the operator.

Move the internal pieces to velox/exec/window/ under the
facebook::velox::exec::window namespace, leaving the public API
(Window, WindowFunction, WindowPartition) unchanged in velox/exec/ and
the facebook::velox::exec namespace. No files outside velox/exec/ change.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@zhli1142015 zhli1142015 force-pushed the move-window-files-to-exec-window branch from 400f129 to e89c26d Compare June 3, 2026 12:53
@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Jun 3, 2026

@bikramSingh91 has imported this pull request. If you are a Meta employee, you can view this in D107420866.

@aditi-pandit
Copy link
Copy Markdown
Collaborator

aditi-pandit commented Jun 3, 2026

Very nice ! When I had attempted this few years ago there weren't as many files as now, so this is great to see !

Copy link
Copy Markdown
Collaborator

@aditi-pandit aditi-pandit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks !

I had abandoned this idea few years ago as there weren't so many files in window, but its amazing to see there are so many now :) Have ideas for some more if I get to it :)

@meta-codesync
Copy link
Copy Markdown

meta-codesync Bot commented Jun 4, 2026

@bikramSingh91 merged this pull request in 2e129c5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged ready-to-merge PR that have been reviewed and are ready for merging. PRs with this tag notify the Velox Meta oncall

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants