Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions cpp/src/arrow/compute/row/grouper.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ struct ARROW_COMPUTE_EXPORT Segment {
int64_t length;
/// \brief whether the segment may be extended by a next one
bool is_open;
/// \brief whether the segment extends a preceeding one
/// \brief whether the segment extends a preceding one
bool extends;
};

Expand All @@ -58,7 +58,7 @@ inline bool operator!=(const Segment& segment1, const Segment& segment2) {

/// \brief a helper class to divide a batch into segments of equal values
///
/// For example, given a batch with two columns specifed as segment keys:
/// For example, given a batch with two columns specified as segment keys:
///
/// A A [other columns]...
/// A A ...
Expand Down
11 changes: 5 additions & 6 deletions cpp/src/parquet/chunker_internal_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ using ::testing::Bool;
using ::testing::Combine;
using ::testing::Values;

// generate determinisic and platform-independent data
// generate deterministic and platform-independent data
Comment thread
Sumdiboii marked this conversation as resolved.
Resolved
inline uint64_t hash(uint64_t seed, uint64_t index) {
uint64_t h = (index + seed) * 0xc4ceb9fe1a85ec53ull;
h ^= h >> 33;
Expand Down Expand Up @@ -658,7 +658,7 @@ void AssertPageLengthDifferences(const ColumnInfo& original, const ColumnInfo& m
// exact_number_of_larger_diffs, and exact_number_of_smaller_diffs parameters specify
// the expected number of differences with equal, larger, and smaller sums of the page
// lengths respectively. The edit_length parameter is used to verify that the page
// lenght differences are exactly equal to the edit_length.
// length differences are exactly equal to the edit_length.
auto diffs = FindDifferences(original.page_lengths, modified.page_lengths);

// Note, the assertion function assumes that all edits are made using the same edit
Expand All @@ -684,7 +684,7 @@ void AssertPageLengthDifferences(const ColumnInfo& original, const ColumnInfo& m
if (diffs.size() != expected_number_of_diffs) {
PrintDifferences(original.page_lengths, modified.page_lengths, diffs);
}
if (diffs.size() == 0) {
if (diffs.empty()) {
// no differences found, the arrays are equal
ASSERT_TRUE(original.page_lengths == modified.page_lengths);
}
Expand Down Expand Up @@ -734,7 +734,7 @@ void AssertPageLengthDifferences(const ColumnInfo& original, const ColumnInfo& m
ASSERT_EQ(left_sum, right_sum);
}

if (diffs.size() == 0) {
if (diffs.empty()) {
// no differences found, the arrays are equal
ASSERT_TRUE(original.page_lengths == modified.page_lengths);
}
Expand Down Expand Up @@ -804,14 +804,13 @@ void AssertContentDefinedChunkSizes(const std::shared_ptr<::arrow::ChunkedArray>
ASSERT_FALSE(column_info.has_dictionary_page);
} else {
ASSERT_EQ(column_info.has_dictionary_page, expect_dictionary_page);
ASSERT_EQ(column_info.has_dictionary_page, expect_dictionary_page);
}

if (::arrow::is_fixed_width(type_id) || ::arrow::is_base_binary_like(type_id) ||
::arrow::is_binary_view_like(type_id)) {
int64_t offset = 0;

auto page_lengths = column_info.page_lengths;
const auto& page_lengths = column_info.page_lengths;
for (size_t i = 0; i < page_lengths.size() - 1; i++) {
// since CDC chunking is applied on the logical values before any parquet encoding
// we first slice the array to get the logical array and then calculate the CDC
Expand Down
Loading