public static boolean[] pickStripesViaTranslatedSarg(SearchArgument sarg, OrcFile.WriterVersion writerVersion, List<OrcProto.Type> types, List<StripeStatistics> stripeStats, int stripeCount) throws FileFormatException { LOG.info("Translated ORC pushdown predicate: " + sarg); assert sarg != null; if (stripeStats == null || writerVersion == OrcFile.WriterVersion.ORIGINAL) { return null; // only do split pruning if HIVE-8732 has been fixed in the writer } // eliminate stripes that doesn't satisfy the predicate condition List<PredicateLeaf> sargLeaves = sarg.getLeaves(); int[] filterColumns = RecordReaderImpl.mapTranslatedSargColumns(types, sargLeaves); TypeDescription schema = OrcUtils.convertTypeFromProtobuf(types, 0); SchemaEvolution evolution = new SchemaEvolution(schema, null); return pickStripesInternal(sarg, filterColumns, stripeStats, stripeCount, null, evolution); }
public static boolean[] pickStripesViaTranslatedSarg(SearchArgument sarg, OrcFile.WriterVersion writerVersion, List<OrcProto.Type> types, List<StripeStatistics> stripeStats, int stripeCount) { LOG.info("Translated ORC pushdown predicate: " + sarg); assert sarg != null; if (stripeStats == null || writerVersion == OrcFile.WriterVersion.ORIGINAL) { return null; // only do split pruning if HIVE-8732 has been fixed in the writer } // eliminate stripes that doesn't satisfy the predicate condition List<PredicateLeaf> sargLeaves = sarg.getLeaves(); int[] filterColumns = RecordReaderImpl.mapTranslatedSargColumns(types, sargLeaves); TypeDescription schema = OrcUtils.convertTypeFromProtobuf(types, 0); SchemaEvolution evolution = new SchemaEvolution(schema, null); return pickStripesInternal(sarg, filterColumns, stripeStats, stripeCount, null, evolution); }