[ 
https://issues.apache.org/jira/browse/OPENJPA-2964?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18148730#comment-18148730
 ] 

ASF subversion and git services commented on OPENJPA-2964:
----------------------------------------------------------

Commit dc20820979f3727bd5b9ceac9449e30d87a72d65 in openjpa's branch 
refs/heads/master from Paul King
[ https://gitbox.apache.org/repos/asf?p=openjpa.git;h=dc2082097 ]

[OPENJPA-3091] Give JPQL set operations the projection of their first operand

The compound QueryExpressions of a UNION, INTERSECT or EXCEPT only held
its operands, so everything that inspects the compound saw a query for
candidate instances: a typed query failed with "no conversion between
query projection type", single-column rows came back as Object[], and
the prepared query SQL cache re-executed a set operation as a query for
instances of the first operand's entity.

Copy the projections, aliases and clauses of the first operand onto the
compound. Leave duplicates to the SQL set operator rather than to
in-memory distinct processing, do not treat a set operation over
aggregates as a single aggregate result, and do not put set operations
into the prepared query SQL cache.

Test scalar, multi-column, aggregate and entity results, typed and
untyped, and the repeated execution of the same set operation, and drop
the remark about the cache defect from the OPENJPA-2964 range test.


> Range ignored in executeSetOperatorQuery
> ----------------------------------------
>
>                 Key: OPENJPA-2964
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-2964
>             Project: OpenJPA
>          Issue Type: Sub-task
>          Components: jpa
>    Affects Versions: 4.2.0
>            Reporter: Maxim Solodovnik
>            Assignee: Richard Zowalla
>            Priority: Major
>             Fix For: 4.2.0
>
>
> Discussion thread: 
> https://github.com/apache/openjpa/pull/144#discussion_r3683002267
> **(medium)** `executeSetOperatorQuery` receives `range` but never uses it, so 
> `setFirstResult`/`setMaxResults` on a UNION/INTERSECT/EXCEPT query are 
> silently ignored. Should the range at least be applied via 
> RangeResultObjectProvider like the normal path does?



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

Reply via email to