RE: Strange Behaviour (with Test Case)

  • From: "Chitale, Hemant K" <Hemant-K.Chitale@xxxxxx>
  • To: "jolliffe@xxxxxxxxx" <jolliffe@xxxxxxxxx>
  • Date: Wed, 5 Aug 2015 01:56:55 +0000

That’s curious. Very curious.

I can confirm the 11.2.0.4 behaviour but I don’t have an Oracle Database
Machine to test the query.

Hemant K Chitale


From: oracle-l-bounce@xxxxxxxxxxxxx [mailto:oracle-l-bounce@xxxxxxxxxxxxx] On
Behalf Of Patrick Jolliffe
Sent: Tuesday, August 04, 2015 5:51 PM
To: oracle-l@xxxxxxxxxxxxx
Subject: Strange Behaviour (with Test Case)

I have been working though a strange case, seems specific to Exadata 12c.
I have simplified as much as possible for now, testcase below.
Obviously we are following up with Oracle support, but wonder if anyone is able
to confirm what we are seeing.
And/Or anybody want to hazard a guess as to what is going wrong?
TIA
Patrick


CREATE TABLE TEST_FACT(CHRTYPE VARCHAR2(3), RATE NUMBER)
INSERT INTO TEST_FACT VALUES('R03', 1.3)
INSERT INTO TEST_FACT VALUES('R03', 1.3)
INSERT INTO TEST_FACT VALUES('LDU', 0.21)
COMMIT;

SELECT SUM(
CASE
WHEN (CHRTYPE = 'R03' OR CHRTYPE = 'LDU')
THEN RATE /10
END )
FROM TEST_FACT;

Result on 11.2.0.4.4 and 12.1.0.2.3 (Linux)
0.281

12.1.0.2.7 (Exadata)
-8.70E+103

This email and any attachments are confidential and may also be privileged. If
you are not the intended recipient, please delete all copies and notify the
sender immediately. You may wish to refer to the incorporation details of
Standard Chartered PLC, Standard Chartered Bank and their subsidiaries at
https://www.sc.com/en/incorporation-details.html

Other related posts: