avatar image
Former Member

After update: SQL UNNEST just returns 1024 elements

Hi everyone, I have a small problem with the sql unnest function.

On our company instance we have the SAP Hana version 1.00.122.04.1478575636 and on my personal trial account I had the version 1.00.112.04.1467296086, "unfortunately" the database was updated last week to the same version.

Before the update the unnest function returned 32768 rows/items.
After the update I just getting 1024 rows/items.

This is our "test-script":

DROP TABLE TEST;
DROP PROCEDURE SAMPLE;
DROP PROCEDURE DFT_PROCEDURE;
CREATE COLUMN TABLE TEST(
"WERTA" INTEGER,
"WERTB" DOUBLE
);
CREATE PROCEDURE SAMPLE()
LANGUAGE SQLSCRIPT AS
BEGIN
DECLARE COUNTER INTEGER = 0;
DECLARE INDEXX INTEGER;

FOR INDEXX IN 1 .. 32768 DO
INSERT INTO TEST VALUES(:INDEXX, (SELECT RAND() FROM DUMMY));
END FOR;
END;
CREATE PROCEDURE DFT_PROCEDURE()
LANGUAGE SQLSCRIPT AS
BEGIN
SELECT * FROM UNNEST((
SELECT DFT("WERTB", 32768 ORDER BY "WERTA").AMPLITUDE FROM "TEST"
)) AS UNNESTED_DFT("DFT_VALUE");
END;
CALL SAMPLE();
CALL DFT_PROCEDURE();

As I already said, this script had returned 32k elements, now just 1024. I changed nothing else. Does anybody know this problem or could you help me? Thanks!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Jan 02, 2017 at 01:11 PM

    A developer of SAP confirm that this is a bug...

    Add comment
    10|10000 characters needed characters exceeded

Skip to Content