feat(parquet): add async support for wasm targets #8460
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Which issue does this PR close?
AsyncFileWriterdoesn't need to beSend#7612.Rationale for this change
This PR introduces
BoxedFuturetype alias to replacefutures::future::BoxFuture.It helps building on WebAssembly targets (e.g.
wasm32-unknown-unknown,wasm32-wasip2).The original codes are driven from: https://github.com/apache/opendal/blob/37efe24235388788b892f46e4101d59ecd37918c/core/src/raw/futures_util.rs#L43-L58
I think it's not an ultimate solution, because the API rework is in progress.
But I think it's useful for now.
What changes are included in this PR?
futures::future::BoxFutureintoBoxedFuturefor WASM targets, which is thread-local.FutureExt::boxedcalls intoBox::pinto catchSendautomaticallyAre these changes tested?
All build steps below are passed on my local machine:
cargo build --package parquet --target wasm32-unknown-unknown -p parquet --features asynccargo build --package parquet --target wasm32-wasip1 -p parquet --features asynccargo build --package parquet --target wasm32-wasip2 -p parquet --features asyncThe tests are not passed because:
wasm32-unknown-unknown:getrandomis not supportedwasm32-wasip1,wasm32-wasip2:tokio/fsis not supported yetAre there any user-facing changes?
NONE