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

Move Count to functions-aggregate, update MSRV to rust 1.75 #10484

Merged
merged 81 commits into from
Jun 12, 2024

Conversation

jayzhan211
Copy link
Contributor

@jayzhan211 jayzhan211 commented May 13, 2024

Which issue does this PR close?

Part of #8708

Rationale for this change

What changes are included in this PR?

Are these changes tested?

Are there any user-facing changes?

There are 3 todos after this PR,

  1. remove builtin aggregate function Count:
  2. remove expr_fn::count and count distinct
  3. rename count's name lowercase

I will file an issue before merging this one

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions physical-expr Physical Expressions optimizer Optimizer rules core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) labels May 13, 2024
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
@jayzhan211 jayzhan211 marked this pull request as ready for review June 5, 2024 06:34
@jayzhan211 jayzhan211 requested a review from alamb June 5, 2024 06:35
@jayzhan211
Copy link
Contributor Author

jayzhan211 commented Jun 5, 2024

error: package `clap_builder v4.5.2` cannot be built because it requires rustc 1.74 or newer, while the currently active rustc version is 1.73.0
Either upgrade to rustc 1.74 or newer, or use
cargo update -p clap_builder@4.5.2 --precise ver
where `ver` is the latest version of `clap_builder` supporting rustc 1.73.0

clap_builder needs 1.74, which used in criterion v0.5.1 (in datafusion-physical-expr)

│   │   ├── petgraph v0.6.5
│   │   │   ├── fixedbitset v0.4.2
│   │   │   └── indexmap v2.2.6 (*)
│   │   └── regex v1.10.4 (*)
│   │   [dev-dependencies]
│   │   ├── arrow v51.0.0 (*)
│   │   ├── criterion v0.5.1
│   │   │   ├── anes v0.1.6
│   │   │   ├── cast v0.3.0
│   │   │   ├── ciborium v0.2.2
│   │   │   │   ├── ciborium-io v0.2.2
│   │   │   │   ├── ciborium-ll v0.2.2
│   │   │   │   │   ├── ciborium-io v0.2.2
│   │   │   │   │   └── half v2.4.1 (*)
│   │   │   │   └── serde v1.0.203 (*)
│   │   │   ├── clap v4.5.4
│   │   │   │   ├── clap_builder v4.5.2
│   │   │   │   │   ├── anstream v0.6.14 (*)
│   │   │   │   │   ├── anstyle v1.0.7
│   │   │   │   │   ├── clap_lex v0.7.0
│   │   │   │   │   └── strsim v0.11.1
│   │   │   │   └── clap_derive v4.5.4 (proc-macro)
│   │   │   │       ├── heck v0.5.0
│   │   │   │       ├── proc-macro2 v1.0.85 (*)
│   │   │   │       ├── quote v1.0.36 (*)
│   │   │   │       └── syn v2.0.66 (*)

I upgrade to 1.75 to the latest available version.

I'm not sure why we have this issue in this PR 🤔

@alamb
Copy link
Contributor

alamb commented Jun 11, 2024

This PR has several conflicts -- other than those, do you think this PR is ready for another review @jayzhan211 ?

@jayzhan211
Copy link
Contributor Author

This PR has several conflicts -- other than those, do you think this PR is ready for another review @jayzhan211 ?

Yes, it is ready for review.

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
@jayzhan211 jayzhan211 marked this pull request as draft June 12, 2024 07:53
@jayzhan211 jayzhan211 force-pushed the count-for-all branch 2 times, most recently from 45249fb to 4bd680d Compare June 12, 2024 13:48
@jayzhan211 jayzhan211 marked this pull request as ready for review June 12, 2024 14:21
@alamb alamb changed the title Move Count to functions-aggregate Move Count to functions-aggregate, update MSRV Jun 12, 2024
@alamb alamb changed the title Move Count to functions-aggregate, update MSRV Move Count to functions-aggregate, update MSRV to rust 1.75 Jun 12, 2024
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Awesome -- thank you @jayzhan211 -- let's do it.

@@ -52,7 +52,7 @@ homepage = "https://datafusion.apache.org"
license = "Apache-2.0"
readme = "README.md"
repository = "https://github.com/apache/datafusion"
rust-version = "1.73"
rust-version = "1.75"
Copy link
Contributor

Choose a reason for hiding this comment

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

@jayzhan211 jayzhan211 merged commit 8f718dd into apache:main Jun 12, 2024
27 checks passed
@jayzhan211 jayzhan211 deleted the count-for-all branch June 12, 2024 23:54
@jayzhan211
Copy link
Contributor Author

Thanks @alamb !

findepi pushed a commit to findepi/datafusion that referenced this pull request Jul 16, 2024
…he#10484)

* mv accumulate indices

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* complete udaf

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* register

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix expr

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* filter distinct count

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* todo: need to move count distinct too

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* move code around

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* move distinct to aggr-crate

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* replace

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* backup

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix function name and physical expr

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix physical optimizer

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix all slt

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* cleanup

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* cleanup

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix with args

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* add label

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* revert builtin related code back

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix test

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix substrait

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix doc

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fmy

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix udaf macro for distinct but not apply

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fmt

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix count distinct and use workspace

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* add reverse

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* remove old code

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* backup

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* use macro

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* expr builder

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* introduce expr builder

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* add example

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fmt

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* clean agg sta

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* combine agg

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* limit distinct and fmt

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* cleanup name

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix ci

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix window

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fmt

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix ci

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fmt

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix merged

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix rebase

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* cleanup

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* use std

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* update mrsv

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* upd msrv

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* revert test

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fmt

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* downgrade to 1.75

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* 1.76

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* ahas

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* revert to 1.75

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm count

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix merge

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fmt

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* clippy

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* rm sum in test_no_duplicate_name

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

* fix

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>

---------

Signed-off-by: jayzhan211 <jayzhan211@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Core DataFusion crate logical-expr Logical plan and expressions optimizer Optimizer rules physical-expr Physical Expressions sqllogictest SQL Logic Tests (.slt) substrait
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants