Skip to content

date_trunc benchmark fails with a panic #15167

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

Closed
Omega359 opened this issue Mar 11, 2025 · 2 comments · Fixed by #15169
Closed

date_trunc benchmark fails with a panic #15167

Omega359 opened this issue Mar 11, 2025 · 2 comments · Fixed by #15169
Labels
bug Something isn't working

Comments

@Omega359
Copy link
Contributor

Describe the bug

Benchmarking date_trunc_minute_1000: Warming up for 3.0000 s
thread 'main' panicked at datafusion/functions/src/datetime/date_trunc.rs:149:16:
index out of bounds: the len is 1 but the index is 1
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

The line # may be off because I'm seeing this in a sidebranch I'm working on but I'm fairly certain this will happen in main too.

The issue is the return type is wrong in the benchmark

let return_type = &udf.return_type(&[timestamps.data_type()]).unwrap();

I think this was broken in #15049

To Reproduce

No response

Expected behavior

No response

Additional context

No response

@Omega359 Omega359 added the bug Something isn't working label Mar 11, 2025
@Omega359
Copy link
Contributor Author

FYI @Blizzara

@Blizzara
Copy link
Contributor

Oh, sad, I totally screwed this line up: https://github.com/apache/datafusion/pull/15049/files#diff-4e41ff9c31349a5ede5e9c4048505bdbd8183a23d88c20c5ae28028d66952bd9R49.

I'll put up a fix, thanks for flagging and sorry!

Blizzara added a commit to Blizzara/datafusion that referenced this issue Mar 11, 2025
alamb pushed a commit that referenced this issue Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants