presto-thrift-api/src/main/java/io/prestosql/plugin/thrift/api/valuesets/PrestoThriftValueSet.java/PrestoThriftValueSet/isExactlyOneNonNull
class PrestoThriftValueSet:    private static boolean isExactlyOneNonNull(Object a, Object b, Object c)
    {
        return a != null && b == null && c == null ||
                a == null && b != null && c == null ||
                a == null && b == null && c != null;
    }