MCPcopy Create free account
hub / github.com/apache/impala / SkipScanRange

Method SkipScanRange

be/src/exec/hdfs-scan-node-base.cc:793–812  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

791}
792
793void HdfsScanNodeBase::SkipScanRange(io::ScanRange* scan_range) {
794 // Avoid leaking unread buffers in scan_range.
795 scan_range->Cancel(Status::CancelledInternal("HDFS partition pruning"));
796 ScanRangeMetadata* metadata = static_cast<ScanRangeMetadata*>(scan_range->meta_data());
797 int64_t partition_id = metadata->partition_id;
798 HdfsPartitionDescriptor* partition = hdfs_table_->GetPartition(partition_id);
799 DCHECK(partition != nullptr) << "table_id=" << hdfs_table_->id()
800 << " partition_id=" << partition_id << "\n"
801 << runtime_state_->instance_ctx();
802 const HdfsFileDesc* desc = GetFileDesc(partition_id, *scan_range->file_string());
803 if (metadata->is_sequence_header) {
804 // File ranges haven't been issued yet, skip entire file.
805 UpdateRemainingScanRangeSubmissions(-1);
806 SkipFile(partition->file_format(), desc);
807 } else {
808 // Mark this scan range as done.
809 HdfsScanNodeBase::RangeComplete(
810 partition->file_format(), desc->file_compression, true);
811 }
812}
813
814Status HdfsScanNodeBase::StartNextScanRange(const std::vector<FilterContext>& filter_ctxs,
815 int64_t* reservation, ScanRange** scan_range) {

Callers

nothing calls this directly

Calls 6

meta_dataMethod · 0.80
GetPartitionMethod · 0.80
file_stringMethod · 0.80
CancelMethod · 0.45
idMethod · 0.45
file_formatMethod · 0.45

Tested by

no test coverage detected