kentkwu opened a new pull request, #24275:
URL: https://github.com/apache/datafusion/pull/24275
## Which issue does this PR close?
- Closes #24274
## Rationale for this change
`CREATE TABLE ... AS SELECT` and `MemTable::load` panic on
`wasm32-unknown-unknown` in browser hosts using `wasm-bindgen-futures`. Both
route through `collect_partitioned`, which unconditionally calls
`JoinSet::spawn` which needs an active tokio reactor. `wasm32-unknown-unknown`
builds typically don't have one.
## What changes are included in this PR?
- Adds a single-partition path to `collect_partitioned`.
- Adds a `test_create_table_as_select` regression test to
`datafusion/wasmtest`, exercising the CTAS path both natively (via
`tokio::test`) and in the browser (via `wasm-pack test`).
Behavior for `partition_count != 1` is unchanged.
## Are these changes tested?
Yes
- Adds a CTAS query-level regression test to the `linux-wasm-pack` CI job.
- Ran wasm-pack test suite on chrome:
- `RUSTFLAGS='--cfg getrandom_backend="wasm_js"' wasm-pack test --headless
--chrome datafusion/wasmtest`
- `cargo fmt --all`
- `cargo clippy --all-targets --all-features -- -D warnings`
- Full workspace extended-tests suite
## Are there any user-facing changes?
No API changes. On `wasm32-unknown-unknown`, `CREATE TABLE ... AS SELECT`
and `MemTable::load` no longer panic.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]