private BooleanExpression primaryKeyOperation(Operator op, PrimaryKey<?> pk1, PrimaryKey<?> pk2) {
        if (pk1 == null || pk2 == null) {
            throw new UnsupportedOperationException("No primary keys available");
        }
        if (pk1.getLocalColumns().size() != pk2.getLocalColumns().size()) {
            throw new UnsupportedOperationException("Size mismatch for primary key columns");
        }
        BooleanExpression rv = null;
        for (int i = 0; i < pk1.getLocalColumns().size(); i++) {
            BooleanExpression pred = Expressions.booleanOperation(op, pk1.getLocalColumns().get(i), pk2.getLocalColumns().get(i));
            rv = rv != null ? rv.and(pred) : pred;
        }
        return rv;
    }
Compares the two relational paths using primary key columns

@param right rhs of the comparison
@return this != right
querydsl-sql/src/main/java/com/querydsl/sql/RelationalPathBase.java