UDTF shaper methods
The calculateShape() method defines
the shape and content of a return table for UDTFs:
calculateShape(UdxOutputShaper *shaper);The following methods operate on the UdxOutputShaper object
to define an output column:
void addOutputColumn(int nType, const char* strName, int nSize);
void addOutputColumn(int nType, const char* strName, int precision,
int scale);
void addOutputColumn(int nType, const char* strName);The following methods operate on the UdxOutputShaper object to
obtain information about the return columns and system casing:
int numOutputColumns();
const UdxColumnInfo* getOutputColumn(int n);
bool isSystemCaseUpper();You can use the following
methods on the UdxColumnInfo object to obtain information about a
column:
int getType();
int getSize();
int getPrecision();
int getScale();
const char* getName();You can use the following
methods on the shaper object to get input arguments and input metadata.
Many of these methods work the same way as the standard UDX Arguments
methods.
int numArgs();
int argType(int n);
int stringArgSize(int n);
int numericArgPrecision(int n);
int numericArgScale(int n);
bool isArgConst(int n);
bool isArgNull(int n);
Numeric32Val* numeric32Arg(int n);
Numeric64Val* numeric64Arg(int n);
Numeric128Val* numeric128Arg(int n);
StringArg* stringArg(int n);
TimeTzADT* timetzArg(int n);
struct Interval* intervalArg(int n);
bool boolArg(int n);
int32 dateArg(int n);
int64 timeArg(int n);
int64 timestampArg(int n);
int8 int8Arg(int n);
int16 int16Arg(int n);
int32 int32Arg(int n);
int64 int64Arg(int n);
float floatArg(int n);
double doubleArg(int n);