Apache DataFusion SQL Query Engine
Fix wasm32 build on version 46 (#15102)
Xiangpeng Hao6f285d6e51d2
diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.ymlindex f37e5c9f7e..4a3aaab884 100644--- a/.github/workflows/rust.yml+++ b/.github/workflows/rust.yml@@ -259,6 +259,10 @@ jobs:uses: ./.github/actions/setup-builderwith:rust-version: stable+ - name: Install dependencies+ run: |+ apt-get update -qq+ apt-get install -y -qq clang- name: Install wasm-packrun: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh- name: Build with wasm-packdiff --git a/datafusion/datasource-parquet/Cargo.toml b/datafusion/datasource-parquet/Cargo.tomlindex d84487bba9..8aa041b7a4 100644--- a/datafusion/datasource-parquet/Cargo.toml+++ b/datafusion/datasource-parquet/Cargo.toml@@ -52,7 +52,7 @@ object_store = { workspace = true }parking_lot = { workspace = true }parquet = { workspace = true }rand = { workspace = true }-tokio = { workspace = true, features = ["fs"] }+tokio = { workspace = true }[dev-dependencies]chrono = { workspace = true }diff --git a/datafusion/datasource-parquet/src/file_format.rs b/datafusion/datasource-parquet/src/file_format.rsindex 48761d85e7..232dd2fbe3 100644--- a/datafusion/datasource-parquet/src/file_format.rs+++ b/datafusion/datasource-parquet/src/file_format.rs@@ -466,7 +466,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,@@ -516,7 +515,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.tomlindex 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 }