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
2 changes: 1 addition & 1 deletion cpp/core/shuffle/FallbackRangePartitioner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ arrow::Status gluten::FallbackRangePartitioner::compute(
auto index = static_cast<int64_t>(vectorIndex) << 32;
for (auto i = 0; i < numRows; ++i) {
auto pid = pidArr[i];
int64_t combined = index | (i & 0xFFFFFFFFLL);
int64_t combined = index | (static_cast<int64_t>(i) & 0xFFFFFFFFLL);
auto& vec = rowVectorIndexMap[pid];
vec.push_back(combined);
if (pid >= numPartitions_) {
Expand Down
2 changes: 1 addition & 1 deletion cpp/core/shuffle/HashPartitioner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ arrow::Status gluten::HashPartitioner::compute(
auto index = static_cast<int64_t>(vectorIndex) << 32;
for (auto i = 0; i < numRows; ++i) {
auto pid = computePid(pidArr, i, numPartitions_);
int64_t combined = index | (i & 0xFFFFFFFFLL);
int64_t combined = index | (static_cast<int64_t>(i) & 0xFFFFFFFFLL);
auto& vec = rowVectorIndexMap[pid];
vec.push_back(combined);
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/core/shuffle/RandomPartitioner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ arrow::Status gluten::RandomPartitioner::compute(
std::unordered_map<int32_t, std::vector<int64_t>>& rowVectorIndexMap) {
auto index = static_cast<int64_t>(vectorIndex) << 32;
for (int32_t i = 0; i < numRows; ++i) {
int64_t combined = index | (i & 0xFFFFFFFFLL);
int64_t combined = index | (static_cast<int64_t>(i) & 0xFFFFFFFFLL);
auto& vec = rowVectorIndexMap[dist_(rng_)];
vec.push_back(combined);
}
Expand Down
2 changes: 1 addition & 1 deletion cpp/core/shuffle/RoundRobinPartitioner.cc
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ arrow::Status gluten::RoundRobinPartitioner::compute(
std::unordered_map<int32_t, std::vector<int64_t>>& rowVectorIndexMap) {
auto index = static_cast<int64_t>(vectorIndex) << 32;
for (int32_t i = 0; i < numRows; ++i) {
int64_t combined = index | (i & 0xFFFFFFFFLL);
int64_t combined = index | (static_cast<int64_t>(i) & 0xFFFFFFFFLL);
auto& vec = rowVectorIndexMap[pidSelection_];
vec.push_back(combined);
pidSelection_ = (pidSelection_ + 1) % numPartitions_;
Expand Down
4 changes: 2 additions & 2 deletions cpp/velox/operators/serializer/VeloxRowToColumnarConverter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ inline int64_t getFieldOffset(int64_t nullBitsetWidthInBytes, int32_t index) {
}

inline bool isNull(uint8_t* buffer_address, int32_t index) {
int64_t mask = 1L << (index & 0x3f); // mod 64 and shift
int64_t wordOffset = (index >> 6) * 8;
int64_t mask = 1L << (static_cast<int64_t>(index) & 0x3f); // mod 64 and shift
int64_t wordOffset = (static_cast<int64_t>(index) >> 6) * 8;
int64_t value = *((int64_t*)(buffer_address + wordOffset));
return (value & mask) != 0;
}
Expand Down