-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix DataFusion test and try to make ballista compile #4
Changes from 12 commits
a02bdab
b0ea1a8
cd62984
1231465
94fd251
71b36aa
0b70766
932f7df
1d00e0b
d2ed5ce
a5326c5
00b7711
1eb510a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1394,7 +1394,7 @@ mod tests { | |
let expr = col("b1").not().eq(lit(true)); | ||
let p = PruningPredicate::try_new(&expr, schema).unwrap(); | ||
let result = p.prune(&statistics).unwrap(); | ||
assert_eq!(result, vec![true, false, false, true, true]); | ||
assert_eq!(result, vec![true, true, false, true, true]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. interesting, looks like arrow2 fixed a bug that exists in arrow-rs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I didn't get too much background on this, since this is a test against pruning of |
||
} | ||
|
||
/// Creates setup for int32 chunk pruning | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -236,7 +236,7 @@ mod tests { | |
#[test] | ||
fn invalid_cast() { | ||
// Ensure a useful error happens at plan time if invalid casts are used | ||
let schema = Schema::new(vec![Field::new("a", DataType::Int32, false)]); | ||
let schema = Schema::new(vec![Field::new("a", DataType::Null, false)]); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Int32 -> LargeBinary cast is valid in arrow2, therefore I change to another unacceptable case |
||
|
||
let result = try_cast(col("a", &schema).unwrap(), &schema, DataType::LargeBinary); | ||
result.expect_err("expected Invalid CAST"); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -511,7 +511,7 @@ impl SortPreservingMergeStream { | |
} | ||
|
||
// emit current batch of rows for current buffer | ||
array_data.extend(buffer_idx, start_row_idx, end_row_idx); | ||
array_data.extend(buffer_idx, start_row_idx, end_row_idx - start_row_idx); | ||
|
||
// start new batch of rows | ||
buffer_idx = next_buffer_idx; | ||
|
@@ -520,7 +520,7 @@ impl SortPreservingMergeStream { | |
} | ||
|
||
// emit final batch of rows | ||
array_data.extend(buffer_idx, start_row_idx, end_row_idx); | ||
array_data.extend(buffer_idx, start_row_idx, end_row_idx - start_row_idx); | ||
array_data.as_arc() | ||
}) | ||
.collect(); | ||
|
@@ -965,7 +965,7 @@ mod tests { | |
options: Default::default(), | ||
}, | ||
PhysicalSortExpr { | ||
expr: col("c7", &schema).unwrap(), | ||
expr: col("c12", &schema).unwrap(), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The original There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 The same thing happens in arrow 6.0 (as pointed out by @houqp ) -- more details here: https://github.com/apache/arrow-datafusion/pull/984/files#r705557467 |
||
options: SortOptions::default(), | ||
}, | ||
]; | ||
|
@@ -1180,7 +1180,7 @@ mod tests { | |
async fn test_async() { | ||
let schema = test::aggr_test_schema(); | ||
let sort = vec![PhysicalSortExpr { | ||
expr: col("c7", &schema).unwrap(), | ||
expr: col("c12", &schema).unwrap(), | ||
options: SortOptions::default(), | ||
}]; | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is due to float nature of inaccuracy, therefore acceptable.