File tree Expand file tree Collapse file tree 3 files changed +2
-48
lines changed Expand file tree Collapse file tree 3 files changed +2
-48
lines changed Original file line number Diff line number Diff line change @@ -22,29 +22,6 @@ public class AverageTestsAsync : LinqTestCase
22
22
[ Test ]
23
23
public async Task CanGetAverageOfIntegersAsDoubleAsync ( )
24
24
{
25
- // TODO 6.0: Enable test for Oracle once nhibernate.oracle.use_binary_floating_point_types is set to true
26
- if ( Dialect is Oracle8iDialect )
27
- {
28
- // The point of this test is to verify that LINQ's Average over an
29
- // integer columns yields a non-integer result, even on databases
30
- // where the corresponding avg() will yield a return type equal to
31
- // the input type. This means the LINQ provider must generate HQL
32
- // that cast the input to double inside the call to avg(). This works
33
- // fine on most databases, but Oracle causes trouble.
34
- //
35
- // The dialect maps double to "DOUBLE PRECISION" on Oracle, which
36
- // on Oracle has larger precision than C#'s double. When such
37
- // values are returned, ODP.NET will convert it to .Net decimal, which
38
- // has lower precision and thus causes an overflow exception.
39
- //
40
- // Some argue that this is a flaw in ODP.NET, others have created
41
- // local dialects that use e.g. BINARY_DOUBLE instead, which more
42
- // closely matches C#'s IEEE 745 double, see e.g. HHH-1961 and
43
- // serveral blogs.
44
-
45
- Assert . Ignore ( "Not supported on Oracle due to casting/overflow issues." ) ;
46
- }
47
-
48
25
//NH-2429
49
26
var average = await ( db . Products . AverageAsync ( x => x . UnitsOnOrder ) ) ;
50
27
Original file line number Diff line number Diff line change @@ -10,29 +10,6 @@ public class AverageTests : LinqTestCase
10
10
[ Test ]
11
11
public void CanGetAverageOfIntegersAsDouble ( )
12
12
{
13
- // TODO 6.0: Enable test for Oracle once nhibernate.oracle.use_binary_floating_point_types is set to true
14
- if ( Dialect is Oracle8iDialect )
15
- {
16
- // The point of this test is to verify that LINQ's Average over an
17
- // integer columns yields a non-integer result, even on databases
18
- // where the corresponding avg() will yield a return type equal to
19
- // the input type. This means the LINQ provider must generate HQL
20
- // that cast the input to double inside the call to avg(). This works
21
- // fine on most databases, but Oracle causes trouble.
22
- //
23
- // The dialect maps double to "DOUBLE PRECISION" on Oracle, which
24
- // on Oracle has larger precision than C#'s double. When such
25
- // values are returned, ODP.NET will convert it to .Net decimal, which
26
- // has lower precision and thus causes an overflow exception.
27
- //
28
- // Some argue that this is a flaw in ODP.NET, others have created
29
- // local dialects that use e.g. BINARY_DOUBLE instead, which more
30
- // closely matches C#'s IEEE 745 double, see e.g. HHH-1961 and
31
- // serveral blogs.
32
-
33
- Assert . Ignore ( "Not supported on Oracle due to casting/overflow issues." ) ;
34
- }
35
-
36
13
//NH-2429
37
14
var average = db . Products . Average ( x => x . UnitsOnOrder ) ;
38
15
Original file line number Diff line number Diff line change @@ -26,12 +26,12 @@ public override JoinFragment CreateOuterJoinFragment()
26
26
27
27
public override void Configure ( IDictionary < string , string > settings )
28
28
{
29
- base . Configure ( settings ) ;
30
-
31
29
_useBinaryFloatingPointTypes = PropertiesHelper . GetBoolean (
32
30
Environment . OracleUseBinaryFloatingPointTypes ,
33
31
settings ,
34
32
false ) ;
33
+
34
+ base . Configure ( settings ) ;
35
35
}
36
36
37
37
// Avoid registering weighted double type when using binary floating point types
You can’t perform that action at this time.
0 commit comments