| 90 | } |
| 91 | |
| 92 | Status HdfsSequenceScanner::InitNewRange() { |
| 93 | DCHECK(header_ != nullptr); |
| 94 | only_parsing_header_ = false; |
| 95 | |
| 96 | HdfsPartitionDescriptor* hdfs_partition = context_->partition_descriptor(); |
| 97 | |
| 98 | text_converter_.reset(new TextConverter(hdfs_partition->escape_char(), |
| 99 | scan_node_->hdfs_table()->null_column_value())); |
| 100 | |
| 101 | delimited_text_parser_.reset(new SequenceDelimitedTextParser( |
| 102 | scan_node_->hdfs_table()->num_cols(), scan_node_->num_partition_keys(), |
| 103 | scan_node_->is_materialized_col(), '\0', hdfs_partition->field_delim(), |
| 104 | hdfs_partition->collection_delim(), hdfs_partition->escape_char())); |
| 105 | |
| 106 | num_buffered_records_in_compressed_block_ = 0; |
| 107 | |
| 108 | SeqFileHeader* seq_header = reinterpret_cast<SeqFileHeader*>(header_); |
| 109 | if (seq_header->is_compressed) { |
| 110 | RETURN_IF_ERROR(UpdateDecompressor(header_->codec)); |
| 111 | } |
| 112 | |
| 113 | // Initialize codegen fn |
| 114 | RETURN_IF_ERROR(InitializeWriteTuplesFn(hdfs_partition, |
| 115 | THdfsFileFormat::SEQUENCE_FILE, "HdfsSequenceScanner")); |
| 116 | return Status::OK(); |
| 117 | } |
| 118 | |
| 119 | Status HdfsSequenceScanner::Open(ScannerContext* context) { |
| 120 | RETURN_IF_ERROR(BaseSequenceScanner::Open(context)); |
nothing calls this directly
no test coverage detected