Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/developer-guide/integrations/datafusion.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ of parallelism.
## Filter and Projection Pushdown

The integration converts DataFusion physical expressions into Vortex expressions using an
`ExpressionConvertor` trait. Supported predicates (comparisons, LIKE, IS NULL, IN lists, casts)
`ExpressionConverter` trait. Supported predicates (comparisons, LIKE, IS NULL, IN lists, casts)
are pushed into the Vortex scan where they participate in pruning and filter evaluation at the
layout level. Unsupported predicates remain in the DataFusion plan and are evaluated after the
scan.
Expand All @@ -52,7 +52,7 @@ efficiently is pushed into the per-file scan for row-level filtering.
Projection pushdown maps DataFusion's requested column indices to Vortex field names and passes
them as a projection expression to the scan. Only the requested columns are read from storage.

The integration supports pluggable expression conversion via a custom `ExpressionConvertor`,
The integration supports pluggable expression conversion via a custom `ExpressionConverter`,
allowing engine-specific rewrites or schema adaptation when file schemas diverge from the table
schema.

Expand Down
13 changes: 12 additions & 1 deletion vortex-arrow/src/dtype.rs
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ pub(crate) fn from_arrow_data_type(
| DataType::Decimal64(precision, scale)
| DataType::Decimal128(precision, scale)
| DataType::Decimal256(precision, scale) => {
DType::Decimal(DecimalDType::new(*precision, *scale), nullability)
DType::Decimal(DecimalDType::try_new(*precision, *scale)?, nullability)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fly by fix

}
DataType::Boolean => DType::Bool(nullability),
DataType::Utf8 | DataType::LargeUtf8 | DataType::Utf8View => DType::Utf8(nullability),
Expand Down Expand Up @@ -612,6 +612,17 @@ mod test {
assert_eq!(dtype.to_arrow_dtype().unwrap(), expected);
}

#[rstest]
#[case::decimal32(DataType::Decimal32(1, 2))]
#[case::decimal64(DataType::Decimal64(1, 2))]
#[case::decimal128(DataType::Decimal128(1, 2))]
#[case::decimal256(DataType::Decimal256(1, 2))]
#[case::zero_precision(DataType::Decimal128(0, 0))]
#[case::excessive_precision(DataType::Decimal256(77, 0))]
fn test_malformed_decimal_dtype_from_arrow(#[case] data_type: DataType) {
assert!(from_arrow_data_type(&data_type, Nullability::Nullable).is_err());
}

#[test]
fn test_variant_dtype_to_arrow_dtype_errors() {
let err = DType::Variant(Nullability::NonNullable)
Expand Down
1 change: 1 addition & 0 deletions vortex-datafusion/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ rstest = { workspace = true }
tempfile = { workspace = true }
tokio = { workspace = true, features = ["test-util", "rt-multi-thread", "fs"] }
url = { workspace = true }
vortex-array = { workspace = true, features = ["_test-harness"] }

[lints]
workspace = true
Loading
Loading