This is an automated email from the ASF dual-hosted git repository.

alamb pushed a commit to branch branch-46
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/branch-46 by this push:
     new 048a1253a5 [branch-46] Fix wasm32 build on version 46 (#15229)
048a1253a5 is described below

commit 048a1253a57a5263b0e9c6babf04449e7bb91425
Author: Andrew Lamb <[email protected]>
AuthorDate: Fri Mar 14 14:59:02 2025 -0400

    [branch-46] Fix wasm32 build on version 46 (#15229)
---
 .github/workflows/rust.yml                            | 4 ++++
 datafusion/core/src/datasource/file_format/parquet.rs | 2 --
 datafusion/wasmtest/Cargo.toml                        | 2 +-
 3 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml
index f9a8a456fb..f1516e247d 100644
--- a/.github/workflows/rust.yml
+++ b/.github/workflows/rust.yml
@@ -259,6 +259,10 @@ jobs:
         uses: ./.github/actions/setup-builder
         with:
           rust-version: stable
+      - name: Install dependencies
+        run: |
+          apt-get update -qq
+          apt-get install -y -qq clang
       - name: Install wasm-pack
         run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf 
| sh
       - name: Build with wasm-pack
diff --git a/datafusion/core/src/datasource/file_format/parquet.rs 
b/datafusion/core/src/datasource/file_format/parquet.rs
index 4a24871aee..32713923b1 100644
--- a/datafusion/core/src/datasource/file_format/parquet.rs
+++ b/datafusion/core/src/datasource/file_format/parquet.rs
@@ -469,7 +469,6 @@ impl FileFormat for ParquetFormat {
 }
 
 /// Coerces the file schema if the table schema uses a view type.
-#[cfg(not(target_arch = "wasm32"))]
 pub fn coerce_file_schema_to_view_type(
     table_schema: &Schema,
     file_schema: &Schema,
@@ -519,7 +518,6 @@ pub fn coerce_file_schema_to_view_type(
 /// If the table schema uses a string type, coerce the file schema to use a 
string type.
 ///
 /// See [ParquetFormat::binary_as_string] for details
-#[cfg(not(target_arch = "wasm32"))]
 pub fn coerce_file_schema_to_string_type(
     table_schema: &Schema,
     file_schema: &Schema,
diff --git a/datafusion/wasmtest/Cargo.toml b/datafusion/wasmtest/Cargo.toml
index 30d5bcaedc..94515c6754 100644
--- a/datafusion/wasmtest/Cargo.toml
+++ b/datafusion/wasmtest/Cargo.toml
@@ -45,7 +45,7 @@ chrono = { version = "0.4", features = ["wasmbind"] }
 # 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 = { workspace = true }
+datafusion = { workspace = true, features = ["parquet"] }
 datafusion-common = { workspace = true, default-features = true }
 datafusion-execution = { workspace = true }
 datafusion-expr = { workspace = true }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to