[hibernate-issues] [Hibernate-JIRA] Resolved: (HHH-6424) On Sybase ASE, avg() function returns a value in the type of the parameters
Strong Liu (JIRA)
noreply at atlassian.com
Mon Jul 11 04:29:14 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Strong Liu resolved HHH-6424.
-----------------------------
Resolution: Won't Fix
for example:
||ID||VALUE||
|1|1|
|2|2|
_Double avgValue = (Double)session.createQuery("select avg(t.value) from Table t").uniqueResult();_
*mysql :* avgValue == 1.5
*sybase :* avgValue == 1
> On Sybase ASE, avg() function returns a value in the type of the parameters
> ---------------------------------------------------------------------------
>
> Key: HHH-6424
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6424
> Project: Hibernate Core
> Issue Type: Bug
> Affects Versions: 3.6.0
> Environment: Hibernate 3.6.6, Sybase ASE15.5, JDK 1.6, Windows XP
> Reporter: Ren Junyan
> Assignee: Strong Liu
> Priority: Minor
>
> JPA specification ask avg() should return Double.
> In Reference Manual:
> When you average (signed or unsigned) int, smallint, tinyint data, Adaptive Server returns the result as an int value.
> But considering it as an ASE feature, it won't be fixed.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list