Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 384237 - Add expected result on SAP HANA Database to query test Scenario2_2c
Summary: Add expected result on SAP HANA Database to query test Scenario2_2c
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard: submitted_patch
Keywords:
Depends on:
Blocks: 383862
  Show dependency tree
 
Reported: 2012-07-04 04:55 EDT by Sabine Heider CLA
Modified: 2022-06-09 10:19 EDT (History)
2 users (show)

See Also:


Attachments
Patch containing the adapted tests (1.05 KB, patch)
2012-07-04 05:08 EDT, Sabine Heider CLA
tom.ware: iplog+
Details | Diff
Patch containing the modified test - git version (1.58 KB, patch)
2012-09-12 06:28 EDT, Sabine Heider CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Sabine Heider CLA 2012-07-04 04:55:54 EDT
The test org.eclipse.persistence.testing.tests.queries.report.Scenario2_2c executes a query with a numeric constant in the select list. The expected data type depends on the database platform, so the test should be modified to cover SAP HANA Database as well.

On SAP HANA Database the constant is returned as a java.lang.Long object. 

I'll attach a patch containing the adapted test.
Comment 1 Sabine Heider CLA 2012-07-04 05:08:17 EDT
Created attachment 218256 [details]
Patch containing the adapted tests
Comment 2 Sabine Heider CLA 2012-09-12 06:28:12 EDT
Created attachment 220966 [details]
Patch containing the modified test - git version

I replaced the old svn patch with a file created by the "git format-patch" command.
Comment 3 Sabine Heider CLA 2012-09-12 16:10:31 EDT
For some reason my patches produce whitespace errors. I could still apply the patch using the command "git apply --whitespace=fix <patch file>" 
- at least I hope that this does what I want it to do...
Comment 4 Tom Ware CLA 2012-09-14 15:14:43 EDT
Changes checked in
Comment 5 Sabine Heider CLA 2013-03-06 06:04:37 EST
There has been a change in the JDBC driver for SAP HANA database:

Up to driver version 1.00.35, a Long is returned for numeric constants in the result set. The driver version is returned as "1.0" by the DatabaseMetaData object, independent of the actual version.

Starting from driver version 1.00.36, the driver version is correctly maintained, and an Integer is returned instead for numeric constants.

The test org.eclipse.persistence.testing.tests.queries.report.Scenario2_2c needs to be changed to reflect the changed driver behavior.
Comment 6 Sabine Heider CLA 2013-03-06 06:07:19 EST
Here is a patched version: 

https://github.com/sabineheider/eclipselink.runtime/commit/5c214dc2db6de24ae4f23efbd9cfd20028128cbb


I assert that I:
- authored 100% the content I am contributing
- have the rights to donate the content to Eclipse
- contribute the content under the EPL
Comment 7 Sabine Heider CLA 2013-03-06 06:08:43 EST
The previous commit has been tested with HANA and MySQL.
Comment 8 Tom Ware CLA 2013-03-06 15:31:51 EST
30f1f790f083618265903a3eec7774a86af863a6

Fix checked in

Reviewed by: Tom Ware - reviewed user submitted fix

Tested with Build -> change only affects HANA
Comment 9 Eclipse Webmaster CLA 2022-06-09 10:19:50 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink