getResultStream() in JPA 2.2

"The Stream API provides a great way to process the result set. But please keep in mind that databases are highly optimized to work with huge datasets and can do that a lot faster than your Java code. So, it’s better to perform all filter, limit and sorting operations in the database and just use the Stream to iterate through the result set."

https://www.thoughts-on-java.org/jpa-2-2s-new-stream-method-and-how-you-should-not-use-it/