// what predicate it wants satisfied in a given field)
//
static Tuple GenerateMatchingTuple(Tuple constraint, Cond predicate) throws IOException {
// first make a copy of the constraint tuple, since we will be modifying it
Tuple t = new Tuple(constraint.arity());
for (int i = 0; i < t.arity(); i++) t.setField(i, constraint.getField(i));
// run best-effort attempt at filling in tuple's "don't care" values (i.e. nulls) in order to satisfy predicate
GenerateMatchingTupleHelper(t, predicate, false);
// test whether the outcome does indeed satisfy the predicate