datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

Add make_time function

Open Omega359 opened this issue 2 weeks ago • 4 comments

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.

Omega359 avatar Dec 07 '25 18:12 Omega359

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.

Omega359 avatar Dec 09 '25 22:12 Omega359

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.

This is so weird issue, sometime cargo clean helps, otherwise rust total reinstall what helped me

comphead avatar Dec 09 '25 23:12 comphead

This is so weird issue, sometime cargo clean helps, 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.

Omega359 avatar Dec 10 '25 03:12 Omega359

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

Omega359 avatar Dec 10 '25 03:12 Omega359

Thanks @Omega359 and @Jefffrey and @comphead

alamb avatar Dec 11 '25 22:12 alamb