You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "waynexia (via GitHub)" <gi...@apache.org> on 2024/01/12 15:10:22 UTC

[PR] feat: add more components to the wasm-pack compatible list [arrow-datafusion]

waynexia opened a new pull request, #8843:
URL: https://github.com/apache/arrow-datafusion/pull/8843

   ## 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.
   -->
   
   Related to https://github.com/apache/arrow-datafusion/pull/7633
   
   
   ## 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.  
   -->
   
   Make more components to be `wasm-unknown-unknown` compatible.
   
   About the background and motivation: I'm trying to continue my side project that builds a web playground based on wasm for datafuson https://github.com/waynexia/datafusion-playground
   
   ## 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 supports for `datafusion-physical-plan`, `datafusion-execution` and `datafusion`.
   
   `datafusion-physical-plan` and `datafusion-execution` doesn't contain any logical changes. It works after I remove some unnecessary feature gates or dependence.
   
   Some methods and logic in `datafusion` are commented out. The affected file is `datafusion/core/src/datasource/listing/url.rs`, all about parsing URL. This is a limitation from our dependence `url`. After some shallow investigates, I guess it's caused by `OsStr` from std isn't available in arch `wasm-unknown-unknown`.
   
   ## Are these changes tested?
   
   Yes
   <!--
   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.
   -->
   No
   


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add more components to the wasm-pack compatible list [arrow-datafusion]

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on PR #8843:
URL: https://github.com/apache/arrow-datafusion/pull/8843#issuecomment-1890274529

   Thanks for your review @alamb 


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add more components to the wasm-pack compatible list [arrow-datafusion]

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia commented on code in PR #8843:
URL: https://github.com/apache/arrow-datafusion/pull/8843#discussion_r1450590801


##########
datafusion/substrait/Cargo.toml:
##########
@@ -36,6 +36,8 @@ object_store = { workspace = true }
 prost = "0.12"
 prost-types = "0.12"
 substrait = "0.22.1"
+
+[dev-dependencies]
 tokio = "1.17"

Review Comment:
   I move this to dev-dependencies casually. But `datafusion-substrait` and `datafusion-proto` are not supported yet.



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add more components to the wasm-pack compatible list [arrow-datafusion]

Posted by "waynexia (via GitHub)" <gi...@apache.org>.
waynexia merged PR #8843:
URL: https://github.com/apache/arrow-datafusion/pull/8843


-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] feat: add more components to the wasm-pack compatible list [arrow-datafusion]

Posted by "alamb (via GitHub)" <gi...@apache.org>.
alamb commented on code in PR #8843:
URL: https://github.com/apache/arrow-datafusion/pull/8843#discussion_r1450983565


##########
datafusion/wasmtest/Cargo.toml:
##########
@@ -37,11 +37,14 @@ crate-type = ["cdylib", "rlib",]
 # all the `std::fmt` and `std::panicking` infrastructure, so isn't great for
 # code size when deploying.
 console_error_panic_hook = { version = "0.1.1", optional = true }
+datafusion = { path = "../core", default-features = false }
 
 datafusion-common = { workspace = true }
+datafusion-execution = { workspace = true }

Review Comment:
   I double checked and this addition means that the wasm ci job now checks these crates
   https://github.com/apache/arrow-datafusion/blob/8353a2ca2fd1f0ed5fc764b7463dfbcaa033ceef/.github/workflows/rust.yml#L192-L207
   
   Here is the example CI run from this PR showing the new crates building in wasm https://github.com/apache/arrow-datafusion/actions/runs/7504130188/job/20430447784?pr=8843#step:6:194



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org