jakartaee / persistence

https://jakartaee.github.io/persistence/
Other
203 stars 59 forks source link

clarify the semantics of JPQL numeric type promotions #515

Closed gavinking closed 7 months ago

gavinking commented 1 year ago

Section 4.8.6 of the spec has a pretty clear definition of implicit conversions in arithmetic expressions.

But the whole of 4.8 in principle only applies to the select clause.

Subsection 4.6.17.1 says that

Arithmetic operations use numeric promotion.

but doesn't explain how promotion works.

I propose moving 4.8.6 into section 4.6.17, and, possibly, pulling 4.6.17 up a level in the spec, since scalar expressions don't only occur in conditional expressions.