my2iu / Jinq

LINQ-style queries for Java 8
Other
659 stars 71 forks source link

[Feature] join supports on condition #116

Open zdu-strong opened 7 months ago

zdu-strong commented 7 months ago

I hope join supports custom on conditions, because it can get faster speed than where conditions.

 public <U> JPAJinqStream<Pair<T, U>> join(
       JinqStream.JoinWithSource<T, U> join,
       JinqStream.WhereForOn<T, U> on);

image

my2iu commented 7 months ago

After looking into this some more, it does seem like JPA 2.1 does support JOIN...ON... queries, so it is feasible to support this. It's possible that if you define an entity relationship, then the JPA provider might also be able to make use of this optimization automatically without needing to explicitly use JOIN...ON... in a query.

I don't really have the time to work on major features for Jinq though, so unless the performance issue is so bad that it's absolutely required, then I probably won't be able to work on this.