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

Add doc examples for eq_dyn etc. #1202

Closed
alamb opened this issue Jan 18, 2022 · 3 comments · Fixed by #1250
Closed

Add doc examples for eq_dyn etc. #1202

alamb opened this issue Jan 18, 2022 · 3 comments · Fixed by #1250
Assignees
Labels
arrow Changes to the arrow crate documentation Improvements or additions to documentation enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers

Comments

@alamb
Copy link
Contributor

alamb commented Jan 18, 2022

The comparison kernels have a somewhat bewildering array of options for a new developer

https://docs.rs/arrow/7.0.0/arrow/compute/kernels/comparison/index.html

We have been making the API easier to use with so called dyn kernels (such as eq_dyn, etc) but this may not be as discoverable as would be ideal.

Thus it would be great to add some doctests to the comparison module that demonstrated how to use those kernels with an example of creating two arrays, and then calling eq_dyn on them

@alamb alamb added documentation Improvements or additions to documentation good first issue Good for newcomers arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog labels Jan 18, 2022
@alamb
Copy link
Contributor Author

alamb commented Jan 18, 2022

Perhaps one could follow the example of

https://docs.rs/arrow/7.0.0/arrow/array/type.StringArray.html

use arrow::array::StringArray;
let array1 = StringArray::from(vec![Some("foo"), None, Some("bar")]);
let array2 = StringArray::from(vec![Some("foo"), None, Some("baz")]);
let result = eq_dyn(&array1, &array2).unwrap();
assert_eq!(BooleanArray::from(vec![Some(true), None, Some(false)]), result))

@HaoYang670
Copy link
Contributor

I can work on it! Please assign to me @alamb

@alamb
Copy link
Contributor Author

alamb commented Jan 27, 2022

Thanks @HaoYang670

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 documentation Improvements or additions to documentation enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants