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 comparison of dictionaries with different values arrays (#332) #333

Merged
merged 1 commit into from
May 23, 2021

Conversation

tustvold
Copy link
Contributor

Which issue does this PR close?

Closes #332.

Rationale for this change

Currently when comparing dictionaries it will use the values array from the left operand with the keys of the right operand. Not only could this lead to invalid indexes, but it will commonly lead to incorrect results

Are there any user-facing changes?

Comparison should now behave as the user would expect

@@ -94,7 +94,7 @@ where
let right_keys = right.keys_array();

let left_values = StringArray::from(left.values().data().clone());
let right_values = StringArray::from(left.values().data().clone());
let right_values = StringArray::from(right.values().data().clone());
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Here's the copypasta

Copy link
Contributor

Choose a reason for hiding this comment

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

image

🤦

@alamb alamb added arrow Changes to the arrow crate bug labels May 20, 2021
Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @tustvold -- FYI @jorgecarleitao / @nevi-me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dictionary Comparison Uses Wrong Values Array
2 participants