HQLQueryPlan allocates a new ArrayList every time even if it is not required

Description

HQLQueryPlan creates a new ArrayList to return every time, however if there is only one translator then it should be possible to just directly return the results list.

Note that this actually results in two additional array allocations, as the ArrayList.addAll() invocation calls .toArray() internally.

Environment

None

Status

Assignee

Stuart Douglas

Reporter

Stuart Douglas

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.0.4

Priority

Major