Teradata 聚合 UDF 中的数组定义

Array defintion in Teradata Aggregate UDF

我正在尝试在 teradata 中创建聚合 UDF 函数。

作为其中的一部分,我正在尝试对中间存储中的数组进行 decalre。

当我试图link它到teradata时,它不断抛出以下错误。

Executed as Single statement.  Failed [7504 : HY000] in UDF/XSP/UDM DBC.IRR: SQLSTATE U0001: 
Elapsed time = 00:00:01.628 

STATEMENT 1: Select Statement failed. 

这是我合并数组的代码。

语法有问题吗?

#include <sqltypes_td.h>
#include <string.h>
#include <math.h>
typedef struct agr_storage {
        FLOAT count;
        FLOAT val1,val2,val3,val4;
    FLOAT res[100]; // This is my array
} AGR_Storage;

Teradata 将每个中间块大小限制为 64 字节,在上面的代码中,我们试图声明一个大小为 800 字节的数组。

这是错误的原因。