Skip to content

Use correct setting for click bench queries in sql_planner benchmark#19835

Merged
alamb merged 1 commit intoapache:mainfrom
alamb:alamb/fix_sql_planner_bench
Jan 15, 2026
Merged

Use correct setting for click bench queries in sql_planner benchmark#19835
alamb merged 1 commit intoapache:mainfrom
alamb:alamb/fix_sql_planner_bench

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Jan 15, 2026

Which issue does this PR close?

Rationale for this change

The ClickBench partitioned dataset was written by an ancient version of pyarrow that that wrote strings with the wrong logical type. To read it correctly, we must automatically convert binary to string.

This is the configuration we run the ClickBench benchmark in as well:

https://github.com/apache/datafusion/blob/cd12d510395eabb7ee51cac0a4cc7c7ffd1ac841/benchmarks/src/clickbench.rs#L184-L183

What changes are included in this PR?

Change the sql planner benchmark to use the correct setting

I tested it manually -- before this change this command fails

cargo bench --profile=dev --bench sql_planner -- q50
...
thread 'main' (38326073) panicked at datafusion/core/benches/sql_planner.rs:62:14:
called `Result::unwrap()` on an `Err` value: Context("type_coercion", Internal("Expect TypeSignatureClass::Native(LogicalType(Native(String), String)) but received NativeType::Binary, DataType: BinaryView"))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

After this change the command passes

Are these changes tested?

Are there any user-facing changes?

@github-actions github-actions bot added the core Core DataFusion crate label Jan 15, 2026
@alamb alamb mentioned this pull request Jan 15, 2026
Copy link
Contributor

@comphead comphead left a comment

Choose a reason for hiding this comment

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

Thanks @alamb

@alamb
Copy link
Contributor Author

alamb commented Jan 15, 2026

Awesome -- thank you @comphead

@alamb alamb added this pull request to the merge queue Jan 15, 2026
Merged via the queue into apache:main with commit 7c9a76a Jan 15, 2026
28 checks passed
de-bgunter pushed a commit to de-bgunter/datafusion that referenced this pull request Mar 24, 2026
…pache#19835)

## Which issue does this PR close?

- Closes apache#19809

## Rationale for this change
The ClickBench partitioned dataset was written by an ancient version of
pyarrow that that wrote strings with the wrong logical type. To read it
correctly, we must automatically convert binary to string.

This is the configuration we run the ClickBench benchmark in as well:


https://github.com/apache/datafusion/blob/cd12d510395eabb7ee51cac0a4cc7c7ffd1ac841/benchmarks/src/clickbench.rs#L184-L183

## What changes are included in this PR?

Change the sql planner benchmark to use the correct setting

I tested it manually -- before this change this command fails

```shell
cargo bench --profile=dev --bench sql_planner -- q50
...
thread 'main' (38326073) panicked at datafusion/core/benches/sql_planner.rs:62:14:
called `Result::unwrap()` on an `Err` value: Context("type_coercion", Internal("Expect TypeSignatureClass::Native(LogicalType(Native(String), String)) but received NativeType::Binary, DataType: BinaryView"))
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```


After this change the command passes



## Are these changes tested?

<!--
We typically require tests for all PRs in order to:
1. Prevent the code from being accidentally broken by subsequent changes
2. Serve as another way to document the expected behavior of the code

If tests are not included in your PR, please explain why (for example,
are they covered by existing tests)?
-->

## Are there any user-facing changes?

<!--
If there are user-facing changes then we may require documentation to be
updated before approving the PR.
-->

<!--
If there are any breaking changes to public APIs, please add the `api
change` label.
-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Core DataFusion crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

type coercion error in clickbench50 query

2 participants