ZhangHuiGui commented on code in PR #41194:
URL: https://github.com/apache/arrow/pull/41194#discussion_r1567594066
##########
cpp/src/arrow/acero/swiss_join.cc:
##########
@@ -188,22 +188,26 @@ void RowArrayAccessor::VisitNulls(const RowTableImpl&
rows, int column_id, int n
const uint32_t* row_ids,
PROCESS_VALUE_FN process_value_fn) {
const uint8_t* null_masks = rows.null_masks();
- uint32_t null_mask_num_bytes = rows.metadata().null_masks_bytes_per_row;
- uint32_t pos_after_encoding = rows.metadata().pos_after_encoding(column_id);
+ uint32_t null_mask_num_bytes = rows.metadata()->null_masks_bytes_per_row;
+ uint32_t pos_after_encoding = rows.metadata()->pos_after_encoding(column_id);
for (int i = 0; i < num_rows; ++i) {
uint32_t row_id = row_ids[i];
int64_t bit_id = row_id * null_mask_num_bytes * 8 + pos_after_encoding;
process_value_fn(i, bit_util::GetBit(null_masks, bit_id) ? 0xff : 0);
}
}
-Status RowArray::InitIfNeeded(MemoryPool* pool, const RowTableMetadata&
row_metadata) {
+Status RowArray::InitIfNeeded(MemoryPool* pool,
+ const std::vector<KeyColumnMetadata>&
column_metadatas) {
if (is_initialized_) {
return Status::OK();
}
- encoder_.Init(row_metadata.column_metadatas, sizeof(uint64_t),
sizeof(uint64_t));
- RETURN_NOT_OK(rows_temp_.Init(pool, row_metadata));
- RETURN_NOT_OK(rows_.Init(pool, row_metadata));
+ row_metadata_.FromColumnMetadataVector(column_metadatas,
Review Comment:
Init `row_metadata_` and pass the pointer into `RowTableEncoder` and
`RowTableImpl`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]