/** * Serializes a list of {@code KuduPredicate} into a byte array. * @return the serialized kudu predicates * @throws IOException */ @InterfaceAudience.LimitedPrivate("kudu-mapreduce") public static List<KuduPredicate> deserialize(Schema schema, byte[] bytes) throws IOException { ByteArrayInputStream bais = new ByteArrayInputStream(bytes); List<KuduPredicate> predicates = new ArrayList<>(); while (bais.available() > 0) { Common.ColumnPredicatePB message = Common.ColumnPredicatePB.parseDelimitedFrom(bais); predicates.add(KuduPredicate.fromPB(schema, message)); } return predicates; }
builder.addPredicate(KuduPredicate.fromPB(table.getSchema(), pred));