-
Notifications
You must be signed in to change notification settings - Fork 12
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
Plugged binary layout #312
Conversation
a22d0a3
to
b1f981e
Compare
constexpr std::compare_three_way_result<T> | ||
operator<=>(const vector_view<T>& lhs, const vector_view<T>& rhs) | ||
{ | ||
return std::lexicographical_compare_three_way(lhs.begin(), lhs.end(), rhs.begin(), rhs.end()); |
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.
Hmm if you can use the std here, it's means that we don't need the sparrow::lexicographical_compare_three_way implementation anymore (because we use newer version of Xcode I guess).
We should remove this code in another PR.
arrow_proxy create_arrow_proxy() | ||
{ | ||
ArrowSchema schema{}; | ||
ArrowArray array{}; | ||
const std::vector<size_t> false_bitmap{m_false_bitmap.begin(), m_false_bitmap.end()}; | ||
test::fill_schema_and_array<std::vector<byte_t>>(schema, array, m_length, m_offset, false_bitmap); | ||
return arrow_proxy{std::move(array), std::move(schema)}; | ||
} |
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.
We should try to no use this anymore and always use the convenient constructors.
And in the convenient constructors test, check the arrow_proxy created.
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 should be done in a dedicated PR where we totally hide the arrow_proxy. As long as the arrow_proxy and the array constructors accepting it are exposed, we need to test them.
CHECK_EQ(array[0].value(), word0); | ||
CHECK_EQ(array[1].value(), word1); | ||
CHECK_EQ(array[4].value(), word4); | ||
} |
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.
Please check the created arrow_proxy
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 we should not. We should totally hide the arrow_proxy, and have constructors accepting ArrowArray and ArrowSchema only. This should be done in a dedicated PR.
test/test_binary_array.cpp
Outdated
CHECK_EQ(array[0].has_value(), true); | ||
CHECK_EQ(array[1].has_value(), true); | ||
CHECK_EQ(array[2].has_value(), false); | ||
CHECK_EQ(array[3].has_value(), false); | ||
CHECK_EQ(array[4].has_value(), true); |
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.
CHECK_EQ(array[0].has_value(), true); | |
CHECK_EQ(array[1].has_value(), true); | |
CHECK_EQ(array[2].has_value(), false); | |
CHECK_EQ(array[3].has_value(), false); | |
CHECK_EQ(array[4].has_value(), true); | |
CHECK(array[0].has_value()); | |
CHECK(array[1].has_value()); | |
CHECK_FALSE(array[2].has_value()); | |
CHECK_FALSE(array[3].has_value()); | |
CHECK(array[4].has_value()); |
test/test_binary_array.cpp
Outdated
word4 | ||
}; | ||
std::vector<std::size_t> where_nulls{2,3}; | ||
binary_array array(words, std::move(where_nulls)); |
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.
binary_array array(words, std::move(where_nulls)); | |
const binary_array array(words, std::move(where_nulls)); |
test/test_binary_array.cpp
Outdated
CHECK_EQ(*citer, true); | ||
CHECK_EQ(*(++citer), false); | ||
CHECK_EQ(*(++citer), true); | ||
CHECK_EQ(*(++citer), true); | ||
CHECK_EQ(*(++citer), false); | ||
CHECK_EQ(*(++citer), true); | ||
CHECK_EQ(*(++citer), true); | ||
CHECK_EQ(*(++citer), true); | ||
CHECK_EQ(*(++citer), true); |
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.
CHECK_EQ(*citer, true); | |
CHECK_EQ(*(++citer), false); | |
CHECK_EQ(*(++citer), true); | |
CHECK_EQ(*(++citer), true); | |
CHECK_EQ(*(++citer), false); | |
CHECK_EQ(*(++citer), true); | |
CHECK_EQ(*(++citer), true); | |
CHECK_EQ(*(++citer), true); | |
CHECK_EQ(*(++citer), true); | |
CHECK(*citer); | |
CHECK_FALSE(*(++citer)); | |
CHECK(*(++citer)); | |
CHECK(*(++citer)); | |
CHECK_FALSE(*(++citer)); | |
CHECK(*(++citer)); | |
CHECK(*(++citer)); | |
CHECK(*(++citer)); | |
CHECK(*(++citer)); |
b1f981e
to
cd52b2d
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #312 +/- ##
=======================================
Coverage ? 91.84%
=======================================
Files ? 77
Lines ? 5736
Branches ? 0
=======================================
Hits ? 5268
Misses ? 468
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I'll update the builders in a dedicated PR, would be nice to finish to merge the remaining PRs so that we can enable precommit-ci and merge #311 |
No description provided.