MCPcopy Index your code
hub / github.com/apache/orc / RecordReaderImpl

Class RecordReaderImpl

java/core/src/java/org/apache/orc/impl/RecordReaderImpl.java:79–1734  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77import java.util.function.Consumer;
78
79public class RecordReaderImpl implements RecordReader {
80 static final Logger LOG = LoggerFactory.getLogger(RecordReaderImpl.class);
81 private static final boolean isLogDebugEnabled = LOG.isDebugEnabled();
82 // as public for use with test cases
83 public static final OrcProto.ColumnStatistics EMPTY_COLUMN_STATISTICS =
84 OrcProto.ColumnStatistics.newBuilder().setNumberOfValues(0)
85 .setHasNull(false)
86 .setBytesOnDisk(0)
87 .build();
88 protected final Path path;
89 private final long firstRow;
90 private final List<StripeInformation> stripes = new ArrayList<>();
91 private OrcProto.StripeFooter stripeFooter;
92 private final long totalRowCount;
93 protected final TypeDescription schema;
94 // the file included columns indexed by the file's column ids.
95 private final boolean[] fileIncluded;
96 private final long rowIndexStride;
97 private long rowInStripe = 0;
98 // position of the follow reader within the stripe
99 private long followRowInStripe = 0;
100 private int currentStripe = -1;
101 private long rowBaseInStripe = 0;
102 private long rowCountInStripe = 0;
103 private final BatchReader reader;
104 private final OrcIndex indexes;
105 // identifies the columns requiring row indexes
106 private final boolean[] rowIndexColsToRead;
107 private final SargApplier sargApp;
108 // an array about which row groups aren't skipped
109 private boolean[] includedRowGroups = null;
110 private final DataReader dataReader;
111 private final int maxDiskRangeChunkLimit;
112 private final StripePlanner planner;
113 // identifies the type of read, ALL(read everything), LEADERS(read only the filter columns)
114 private final TypeReader.ReadPhase startReadPhase;
115 // identifies that follow columns bytes must be read
116 private boolean needsFollowColumnsRead;
117 private final boolean noSelectedVector;
118 // identifies whether the file has bad bloom filters that we should not use.
119 private final boolean skipBloomFilters;
120 static final String[] BAD_CPP_BLOOM_FILTER_VERSIONS = {
121 "1.6.0", "1.6.1", "1.6.2", "1.6.3", "1.6.4", "1.6.5", "1.6.6", "1.6.7", "1.6.8",
122 "1.6.9", "1.6.10", "1.6.11", "1.7.0"};
123
124 /**
125 * Given a list of column names, find the given column and return the index.
126 *
127 * @param evolution the mapping from reader to file schema
128 * @param columnName the fully qualified column name to look for
129 * @return the file column number or -1 if the column wasn't found in the file schema
130 * @throws IllegalArgumentException if the column was not found in the reader schema
131 */
132 static int findColumns(SchemaEvolution evolution,
133 String columnName) {
134 TypeDescription fileColumn = findColumnType(evolution, columnName);
135 return fileColumn == null ? -1 : fileColumn.getId();
136 }

Callers

nothing calls this directly

Calls 4

newBuilderMethod · 0.80
buildMethod · 0.65
setHasNullMethod · 0.45
setNumberOfValuesMethod · 0.45

Tested by

no test coverage detected