Skip to content

Commit b9ac78b

Browse files
authored
feat: Add Spark-compatible implementation of SchemaAdapterFactory (#1169)
* Add Spark-compatible SchemaAdapterFactory implementation * remove prototype code * fix * refactor * implement more cast logic * implement more cast logic * add basic test * improve test * cleanup * fmt * add support for casting unsigned int to signed int * clippy * address feedback * fix test
1 parent f1d0879 commit b9ac78b

File tree

9 files changed

+758
-69
lines changed

9 files changed

+758
-69
lines changed

native/Cargo.lock

Lines changed: 63 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

native/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ arrow-buffer = { version = "53.2.0" }
3939
arrow-data = { version = "53.2.0" }
4040
arrow-schema = { version = "53.2.0" }
4141
parquet = { version = "53.2.0", default-features = false, features = ["experimental"] }
42-
datafusion-common = { version = "43.0.0" }
4342
datafusion = { version = "43.0.0", default-features = false, features = ["unicode_expressions", "crypto_expressions"] }
43+
datafusion-common = { version = "43.0.0" }
4444
datafusion-functions = { version = "43.0.0", features = ["crypto_expressions"] }
4545
datafusion-functions-nested = { version = "43.0.0", default-features = false }
4646
datafusion-expr = { version = "43.0.0", default-features = false }

native/core/src/parquet/util/test_common/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
// specific language governing permissions and limitations
1616
// under the License.
1717

18-
pub mod file_util;
1918
pub mod page_util;
2019
pub mod rand_gen;
2120

2221
pub use self::rand_gen::{random_bools, random_bytes, random_numbers, random_numbers_range};
2322

24-
pub use self::file_util::{get_temp_file, get_temp_filename};
23+
pub use datafusion_comet_spark_expr::test_common::file_util::{get_temp_file, get_temp_filename};

native/spark-expr/Cargo.toml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ arrow-buffer = { workspace = true }
3333
arrow-data = { workspace = true }
3434
arrow-schema = { workspace = true }
3535
chrono = { workspace = true }
36-
datafusion = { workspace = true }
36+
datafusion = { workspace = true, features = ["parquet"] }
3737
datafusion-common = { workspace = true }
3838
datafusion-expr = { workspace = true }
3939
datafusion-physical-expr = { workspace = true }
@@ -43,9 +43,11 @@ regex = { workspace = true }
4343
thiserror = { workspace = true }
4444
futures = { workspace = true }
4545
twox-hash = "2.0.0"
46+
rand = { workspace = true }
4647

4748
[dev-dependencies]
4849
arrow-data = {workspace = true}
50+
parquet = { workspace = true, features = ["arrow"] }
4951
criterion = "0.5.1"
5052
rand = { workspace = true}
5153
tokio = { version = "1", features = ["rt-multi-thread"] }

0 commit comments

Comments
 (0)