MCPcopy Create free account
hub / github.com/apache/orc / getStatistics

Method getStatistics

java/core/src/java/org/apache/orc/impl/ReaderImpl.java:361–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

359 }
360
361 @Override
362 public ColumnStatistics[] getStatistics() {
363 ColumnStatistics[] result = deserializeStats(schema, fileStats);
364 if (encryption.getKeys().length > 0) {
365 try (CompressionCodec codec = OrcCodecPool.getCodec(compressionKind)) {
366 InStream.StreamOptions compression = InStream.options();
367 if (codec != null) {
368 compression.withCodec(codec).withBufferSize(bufferSize);
369 }
370 for (int c = schema.getId(); c <= schema.getMaximumId(); ++c) {
371 ReaderEncryptionVariant variant = encryption.getVariant(c);
372 if (variant != null) {
373 try {
374 int base = variant.getRoot().getId();
375 ColumnStatistics[] overrides = decryptFileStats(variant,
376 compression, tail.getFooter());
377 for(int sub=0; sub < overrides.length; ++sub) {
378 result[base + sub] = overrides[sub];
379 }
380 } catch (IOException e) {
381 throw new RuntimeException("Can't decrypt file stats for " + path +
382 " with " + variant.getKeyDescription());
383 }
384 }
385 }
386 }
387 }
388 return result;
389 }
390
391 private ColumnStatistics[] decryptFileStats(ReaderEncryptionVariant encryption,
392 InStream.StreamOptions compression,

Callers

nothing calls this directly

Calls 13

deserializeStatsMethod · 0.95
getCodecMethod · 0.95
optionsMethod · 0.95
getRootMethod · 0.95
decryptFileStatsMethod · 0.95
getKeyDescriptionMethod · 0.95
withBufferSizeMethod · 0.80
getMaximumIdMethod · 0.80
getKeysMethod · 0.45
withCodecMethod · 0.45
getIdMethod · 0.45
getVariantMethod · 0.45

Tested by

no test coverage detected