Skip to content

[pull] main from apache:main - #266

Merged
pull[bot] merged 3 commits into
buraksenn:mainfrom
apache:main
Jun 9, 2026
Merged

pull[bot] merged 3 commits into
buraksenn:mainfrom
apache:main

Conversation

@pull

@pull pull Bot commented Jun 9, 2026 •

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

2010YOUY01 and others added 3 commits June 9, 2026 02:34
## Which issue does this PR close?

<!--
We generally require a GitHub issue to be filed for all bug fixes and
enhancements and this helps us generate change logs for our releases.
You can link an issue to this PR using the GitHub syntax. For example
`Closes #123` indicates that this PR will close issue #123.
-->

- Closes #.

## Rationale for this change

<!--
Why are you proposing this change? If this is already explained clearly
in the issue then this section is not needed.
Explaining clearly why changes are proposed helps reviewers understand
your changes and offer better suggestions for fixes.
-->
Figured this out when working through the codebase, I think it worth
some more comment.

## What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->

## 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.
-->
## Which issue does this PR close?

Addresses the suggestion in
#22360 (review)
to add an example for specifying an Arrow schema for a
`PartitionedFile`.

## What changes are included in this PR?

<!--
There is no need to duplicate the description in the issue here but it
is sometimes worth providing a summary of the individual changes in this
PR.
-->

* Add an example in
`datafusion-examples/examples/data_io/partitioned_file_schema.rs`.

## 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)?
-->

Tested with 

```bash
cd datafusion-examples/examples
cargo run --example data_io -- partitioned_file_schema
```

## Are there any user-facing changes?

No 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.
-->

cc @alamb

---------

Co-authored-by: Andrew Lamb <andrew@nerdnetworks.org>
…22836)

## Which issue does this PR close?

- Relates to #21968 (wide-schema benchmark work).

## Rationale for this change

Every `sql_benchmarks` suite declares its external-table `LOCATION` as
`${DATA_DIR:-data}/...`, and the matching `bench.sh run_*` forwards
`DATA_DIR="${DATA_DIR}"` to the benchmark process — e.g. `clickbench`,
`imdb`, `tpch`, `push_down_topk`, `h2o` all do this.

`wide_schema` (added in #21970) diverged on **both** counts:
- `wide_schema/init/load.sql` hardcoded `LOCATION
'data/wide_schema/...'` (no `${DATA_DIR}`)
- `run_wide_schema` did not forward `DATA_DIR`

Run from inside the repo this happens to work, because the process CWD
is the repo's `benchmarks/` and the relative `data/` path resolves. But
it breaks whenever the data directory is not under the current directory
— for example the CI benchmark runner builds/runs the benchmark from a
separate source checkout while staging the dataset elsewhere and
pointing at it via `DATA_DIR`. There, wide_schema fails at load:

```
initialization failed: No files found at file:///.../benchmarks/data/wide_schema/wide/.
Cannot infer schema from an empty location; either add data files or declare an explicit schema for the table.
```

(The `bench.sh` variable `DATA_DIR` is set but not exported, so it only
reaches the benchmark when a `run_*` function passes it explicitly —
which `run_tpch` etc. do and `run_wide_schema` did not.)

## What changes are included in this PR?

Two one-line fixes bringing `wide_schema` in line with the convention
used by every other suite:
- `load.sql`: `data/wide_schema/...` →
`${DATA_DIR:-data}/wide_schema/...`
- `run_wide_schema`: forward `DATA_DIR="${DATA_DIR}"` for both the
`wide` and `narrow` subgroups

## Are these changes tested?

Benchmark tooling only. The substitution path is the same one every
other suite already relies on: the SQL harness's `process_replacements`
resolves `${DATA_DIR:-data}` from the env (falling back to `data`), and
`run_wide_schema` now forwards `DATA_DIR` exactly as `run_tpch` does.
Verified `bench.sh` still parses (`bash -n`). Default in-repo behavior
is unchanged (CWD-relative `data/`).

## Are there any user-facing changes?

No. Benchmark harness only.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@pull pull Bot locked and limited conversation to collaborators Jun 9, 2026
@pull pull Bot added the ⤵️ pull label Jun 9, 2026
@pull
pull Bot merged commit 9b81ff8 into buraksenn:main Jun 9, 2026
19 of 20 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants