MCPcopy Create free account
hub / github.com/apache/arrow / GetKey

Method GetKey

cpp/src/arrow/acero/asof_join_node.cc:586–615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

584 }
585
586 inline ByType GetKey(const RecordBatch* batch, row_index_t row) const {
587 if (must_hash_) {
588 // Query the key hasher. This may hit cache, which must be valid for the batch.
589 // Therefore, the key hasher is invalidated when a new batch is pushed - see
590 // `InputState::Push`.
591 return key_hasher_->HashesFor(batch)[row];
592 }
593 if (key_col_index_.size() == 0) {
594 return 0;
595 }
596 auto data = batch->column_data(key_col_index_[0]);
597 switch (key_type_id_[0]) {
598 LATEST_VAL_CASE(INT8, key_value)
599 LATEST_VAL_CASE(INT16, key_value)
600 LATEST_VAL_CASE(INT32, key_value)
601 LATEST_VAL_CASE(INT64, key_value)
602 LATEST_VAL_CASE(UINT8, key_value)
603 LATEST_VAL_CASE(UINT16, key_value)
604 LATEST_VAL_CASE(UINT32, key_value)
605 LATEST_VAL_CASE(UINT64, key_value)
606 LATEST_VAL_CASE(DATE32, key_value)
607 LATEST_VAL_CASE(DATE64, key_value)
608 LATEST_VAL_CASE(TIME32, key_value)
609 LATEST_VAL_CASE(TIME64, key_value)
610 LATEST_VAL_CASE(TIMESTAMP, key_value)
611 default:
612 DCHECK(false);
613 return 0; // cannot happen
614 }
615 }
616
617 inline OnType GetLatestTime() const {
618 return GetTime(GetLatestBatch().get(), time_type_id_, time_col_index_,

Callers 5

RestoreTestBucketMethod · 0.45
UploadPartErrorMethod · 0.45
ToFileInfosMethod · 0.45
operator()Method · 0.45

Calls 2

column_dataMethod · 0.80
sizeMethod · 0.45

Tested by 1

RestoreTestBucketMethod · 0.36