| 791 | } |
| 792 | |
| 793 | void 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 | |
| 814 | Status HdfsScanNodeBase::StartNextScanRange(const std::vector<FilterContext>& filter_ctxs, |
| 815 | int64_t* reservation, ScanRange** scan_range) { |
nothing calls this directly
no test coverage detected