Add make_time function
Which issue does this PR close?
- Part of #19025
Rationale for this change
There wasn't a good way to make a time from component parts.
What changes are included in this PR?
Code, test, docs
Are these changes tested?
Yes
Are there any user-facing changes?
New function.
Not sure what to do about the cargo fmt error - the PR output is what cargo fmt results in locally.
bruce@devbox:/opt/dev/datafusion$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home: /home/bruce/.rustup
installed toolchains
--------------------
stable-x86_64-unknown-linux-gnu (default)
1.89.0-x86_64-unknown-linux-gnu
1.90.0-x86_64-unknown-linux-gnu
1.91.0-x86_64-unknown-linux-gnu (active)
active toolchain
----------------
name: 1.91.0-x86_64-unknown-linux-gnu
active because: overridden by '/opt/dev/datafusion/rust-toolchain.toml'
installed targets:
x86_64-unknown-linux-gnu
Seems very odd.
Not sure what to do about the cargo fmt error - the PR output is what cargo fmt results in locally.
bruce@devbox:/opt/dev/datafusion$ rustup show Default host: x86_64-unknown-linux-gnu rustup home: /home/bruce/.rustup installed toolchains -------------------- stable-x86_64-unknown-linux-gnu (default) 1.89.0-x86_64-unknown-linux-gnu 1.90.0-x86_64-unknown-linux-gnu 1.91.0-x86_64-unknown-linux-gnu (active) active toolchain ---------------- name: 1.91.0-x86_64-unknown-linux-gnu active because: overridden by '/opt/dev/datafusion/rust-toolchain.toml' installed targets: x86_64-unknown-linux-gnuSeems very odd.
This is so weird issue, sometime cargo clean helps, otherwise rust total reinstall what helped me
This is so weird issue, sometime
cargo cleanhelps, otherwise rust total reinstall what helped me
I've noticed cargo fmt bouncing around the ordering of imports in 1.91 in my other projects. It's rather annoying honestly and feels like needless bikeshedding.
More info: the only way I could get rust fmt to output the use statements in the same order as ci was to force the datafusion-functions crate to use the 2024 edition (vs workspace now which is edition 2021). This feels like a cargo bug ...
More info: https://doc.rust-lang.org/edition-guide/rust-2024/rustfmt-version-sorting.html
Thanks @Omega359 and @Jefffrey and @comphead