Error writing an array of NUMERIC(24,6) to the database [CORE6302] #6544
Submitted by: Tony Whyman (twhyman)
I have created a table as follows in order to test out FB4 array handling with the new datatypes.
Create Table FB4TestData_DECFloat_AR
The metadata indicates that the first two arrays are arrays of DecFloat(16) and DecFloat(34) respectively, while the latter is an INT128 array with a scale factor of -6.
Running separate tests on each array column: the first two perform as expected with both read and write operations successful and the read results corresponding to the write. However, the "putslice" API method fails when writing the NUMERIC(24,6) array type with the error message:
column not array or invalid dimensions (expected 0, encountered 1).
The SDL for the putslice is the same as for the Float34 array except for the data type and scale factor. The SDL is generated following src/yvalve/array.epp
====== Test Details ======
Deferred until FDB will support new DECFLOAT data type introduced in FB 4.x
The text was updated successfully, but these errors were encountered:
Commented by: Tony Whyman (twhyman)
Alex, I started preparing a detailed response and in going through the code, I decided to try a variation on the SDL generation. I had assumed that blr_int128 would behave the same as blr_short,blr_long, blr_int64, and blr_quad and require that a scale was included in the SDL Block. In one last attempt to make it work, I commented out the line that added the scale factor for blr_int128, recompiled the test - and it worked.
In the end, the problem is lack of documentation and that I hadn't tried all possible combinations. The bug should now be closed - but at least anyone else who falls into the same trap will find this report when they google it.
Modified by: @pavel-zotov
status: Closed [ 6 ] => Closed [ 6 ]
Test Details: Deferred until FDB will support new DECFLOAT data type introduced in FB 4.x => Deferred until FDB will support new DECFLOAT data type introduced in FB 4.x