Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port tests in aggregates.rs to sqllogictest #8194

Closed
Tracked by #6195
alamb opened this issue Nov 15, 2023 · 4 comments
Closed
Tracked by #6195

Port tests in aggregates.rs to sqllogictest #8194

alamb opened this issue Nov 15, 2023 · 4 comments
Labels
good first issue Good for newcomers

Comments

@alamb
Copy link
Contributor

alamb commented Nov 15, 2023

Is your feature request related to a problem or challenge?

Part of #6195. We are trying to

  1. keep the DataFusion code base clean and easy to contribute to and modify
  2. Understand what features are covered and what are not

Part of doing so is having a single location for most test coverage so new tests can be added easily and people can follow the existing patterns easily

Describe the solution you'd like

Port the tests in https://github.com/apache/arrow-datafusion/blob/main/datafusion/core/tests/sql/aggregates.rs to
aggregates.slt in https://github.com/apache/arrow-datafusion/tree/main/datafusion/sqllogictest/test_files

Note you can create catalogs and schema via SQL now

Catalogs: https://arrow.apache.org/datafusion/user-guide/sql/ddl.html#create-database
Schema: https://arrow.apache.org/datafusion/user-guide/sql/ddl.html#create-schema

Notes:

  1. Instructions for running sqllogitest are here: https://github.com/apache/arrow-datafusion/tree/main/datafusion/sqllogictest

Describe alternatives you've considered

No response

Additional context

I think these are good first issues as they teach the contributor about the DataFusion codebase and tests, as well as see the end user apis in practice.

@edmondop
Copy link
Contributor

@alamb I was starting to look into this, and I see an https://github.com/apache/arrow-datafusion/blob/main/datafusion/sqllogictest/test_files/aggregate.slt already existing. Can I assume that all tests that are still in https://github.com/apache/arrow-datafusion/issues/8194#:~:text=main/datafusion/core/tests/sql/aggregates.rs have not been migrated to SQL Tests?

@alamb
Copy link
Contributor Author

alamb commented Nov 22, 2023

Can I assume that all tests that are still in https://github.com/apache/arrow-datafusion/issues/8194#:~:text=main/datafusion/core/tests/sql/aggregates.rs have not been migrated to SQL Tests?

I think you'll need to check the tests individually to see if they have already been ported

@edmondop
Copy link
Contributor

edmondop commented Nov 22, 2023

Can I assume that all tests that are still in apache/arrow-datafusion/issues/8194#:~:text=main/datafusion/core/tests/sql/aggregates.rs have not been migrated to SQL Tests?

I think you'll need to check the tests individually to see if they have already been ported

Leaving here as a reference the current Rust test lists:

  • csv_query_array_agg_distinct
  • aggregate
  • aggregate_empty
  • aggregate_avg
  • aggregate_max
  • aggregate_min
  • aggregate_grouped
  • aggregate_grouped_avg
  • aggregate_grouped_empty
  • aggregate_grouped_max
  • aggregate_grouped_min
  • aggregate_min_max_w_custom_window_frames
  • aggregate_min_max_w_custom_window_frames_unbounded_start
  • aggregate_avg_add
  • case_sensitive_identifiers_aggregates
  • count_basic
  • count_partitioned
  • count_aggregated
  • count_aggregated_cube
  • count_multi_expr
  • count_multi_expr_group_by
  • simple_avg
  • simple_mean
  • run_count_distinct_integers_aggregated_scenario
  • count_distinct_integers_aggregated_single_partition
  • count_distinct_integers_aggregated_multiple_partitions
  • aggregate_with_alias
  • test_accumulator_row_accumulator

@alamb
Copy link
Contributor Author

alamb commented Jan 25, 2024

I think we have ported all the tests that make sense here so claiming victory

@alamb alamb closed this as completed Jan 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants