Skip to content
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 several tests #8

Merged
merged 1 commit into from
Sep 25, 2021
Merged

Fix several tests #8

merged 1 commit into from
Sep 25, 2021

Conversation

yjshen
Copy link
Collaborator

@yjshen yjshen commented Sep 25, 2021

No description provided.

.and_then(|filter_array| {
let is_not_null = is_not_null(filter_array as &dyn Array);
let and_filter = and(&is_not_null, filter_array)?;
filter_record_batch(batch, &and_filter)
Copy link
Collaborator Author

@yjshen yjshen Sep 25, 2021

Choose a reason for hiding this comment

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

per filter_record_batch doc, we should make filter array null free first:

/// Returns a new [RecordBatch] with arrays containing only values matching the filter.
/// WARNING: the nulls of `filter` are ignored and the value on its slot is considered.
/// Therefore, it is considered undefined behavior to pass `filter` with null values.
pub fn filter_record_batch(
    record_batch: &RecordBatch,
    filter_values: &BooleanArray,
) -> Result<RecordBatch> {

@@ -944,7 +944,7 @@ async fn csv_query_nullif_divide_by_0() -> Result<()> {
let expected = vec![
vec!["258"],
vec!["664"],
vec!["NULL"],
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I've changed part of the expected Null value representation in this file, from "NULL" to "" to make NULL representation consistent in the file itself. (some of NULL are represented as "NULL" and others are empty string already). and follow that in arrow2 at the same time.

);
// TODO: precision here.
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I haven't dig too much into the interval calculation method here. fail due to precision problem I think

@houqp houqp merged commit b585f3b into houqp:arrow2-merge Sep 25, 2021
@yjshen yjshen deleted the am branch April 22, 2022 08:32
houqp pushed a commit that referenced this pull request May 27, 2024
…he#10527)

* chore: merge main and resolve conflict

* chore: use less copy

* chore: remove clone

* remove more clones (#8)

* refactor: use HashSet<&Expr> instead of HashSet<String>

* refactor: remove more cloning

* chore: reduce string allocation

Co-authored-by: Adam Curtis <adam.curtis.dev@gmail.com>

* chore: return internal error instead of panacing

* chore: use arg display_name as hash key instead of a hashed value

---------

Co-authored-by: Adam Curtis <adam.curtis.dev@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants