Aggregate functions
Module documentation and detailed description for aggregate functions
Function/Subroutine documentation
- subroutine nzaeGetNextAggregation(handle)
Gets the next aggregation state.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- handle
- Parameters
- subroutine nzaeGetNumberOfStateColumns(handle, result)
Gets the next aggregation state.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- result
(integer) The number of columns in the state.
- handle
- Parameters
- subroutine nzaeGetStateBoolean(handle, columnIndex, result, isNull)
Gets the state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(integer) The state.
- isNull
(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
- Parameters
- subroutine nzaeGetInputStateBoolean(handle, columnIndex, result,
isNull)
Gets the input state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(integer) The state.
- isNull
(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
This function is only valid during the "merge" and "final-result" aggregation process state. Calls to this function at any other time sends a user error.
- Parameters
- subroutine nzaeGetStateDouble(handle, columnIndex, result, isNull)
Gets the state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(real*8) The state.
- isNull
(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
- Parameters
- subroutine nzaeGetInputStateDouble(handle, columnIndex, result,
isNull)
Gets the input state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(real*8) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
This function is only valid during the "merge" and "final-result" aggregation process state. Calls to this function at any other time sends a user error.
- Parameters
- subroutine nzaeGetStateFloat(handle, columnIndex, result, isNull)
Gets the state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(real) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
- Parameters
- subroutine nzaeGetInputStateFloat(handle, columnIndex, result, isNull)
Gets the input state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(real) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
This function is only valid during the "merge" and "final-result" aggregation process state. Calls to this function at any other time sends a user error.
- Parameters
- subroutine nzaeGetStateInt8(handle, columnIndex, result, isNull)
Gets the state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(real) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
- Parameters
- subroutine nzaeGetInputStateInt8(handle, columnIndex, result, isNull)
Gets the input state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(integer) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
This function is only valid during the "merge" and "final-result" aggregation process state. Calls to this function at any other time sends a user error.
- Parameters
- subroutine nzaeGetStateInt16(handle, columnIndex, result, isNull)
Gets the state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(integer) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
- Parameters
- subroutine nzaeGetInputStateInt16(handle, columnIndex, result, isNull)
Gets the input state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(integer) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
This function is only valid during the "merge" and "final-result" aggregation process state. Calls to this function at any other time sends a user error.
- Parameters
- subroutine nzaeGetStateInt32(handle, columnIndex, result, isNull)
Gets the state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(integer) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
- Parameters
- subroutine nzaeGetInputStateInt32(handle, columnIndex, result, isNull)
Gets the input state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(integer) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
This function is only valid during the "merge" and "final-result" aggregation process state. Calls to this function at any other time sends a user error.
- Parameters
- subroutine nzaeGetStateString(handle, columnIndex, result, isNull)
Gets the state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(character*) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
- Parameters
- subroutine nzaeGetInputStateString(handle, columnIndex, result,
isNull)
Gets the input state value at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(character*) The state.
isNull(integer) The value is 1 if the value is NULL; 0 otherwise.
- handle
This function is only valid during the "merge" and "final-result" aggregation process state. Calls to this function at any other time sends a user error.
- Parameters
- subroutine nzaeGetStateScale(handle, columnIndex, result)
Gets the scale of the state at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
((integer) The scale of the state field.
- handle
- Parameters
- subroutine nzaeGetStateSize(handle, columnIndex, result)
Gets the size of the state at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(integer) The size of the state field.
- handle
- Parameters
- subroutine nzaeGetStateType(handle, columnIndex, result)
Gets the type of the state at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- result
(integer) The type of the state field.
- handle
- Parameters
- subroutine nzaeIsAggDone(handle, isDone)
Determines if the aggregation is done.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- isDone
(integer) The value is 1 if the aggregation is done; 0 otherwise.
- handle
- Parameters
- subroutine nzaeIsAggError(handle, isError)
Determines if the aggregation had an error.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- isError
(integer) The value is 1 if the aggregation had an error; 0 otherwise.
- handle
- Parameters
- subroutine nzaeIsAggStateAccumulate(handle, isAccumulate)
Determines if the aggregation state is "accumulate".
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- isAccumulate
(integer) The value is 1 if the aggregation state is "accumulate"; 0 otherwise.
- handle
- Parameters
- subroutine nzaeIsAggStateInitializeState(handle,
isInitializeState)
Determines if the aggregation state is "initialize-state".
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- isInitializeState
(integer) The value is 1 if the aggregation state is "initialize-state"; 0 otherwise.
- handle
- Parameters
- subroutine nzaeIsAggStateAccumulate(handle, isFinalResult)
Determines if the aggregation state is "final-result".
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- isFinalResult
(integer) The value is 1 if the aggregation state is "final-result"; 0 otherwise..
- handle
- Parameters
- ssubroutine nzaeIsAggStateMerge(handle, isMerge)
Determines if the aggregation state is "merge".
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- isMerge
(integer) The value is 1 if the aggregation state is "merge"; 0 otherwise.
- handle
- Parameters
- subroutine nzaeIsInputStateNull(handle, columnIndex, isNull)
Determines if the input state value is NULL at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- isNull
(integer) The value is 1 if the input state value is NULL; 0 otherwise.
- handle
This function is only valid during the "merge" and "final-result" aggregation process state. Calls to this function at any other time sends a user error.
- Parameters
- subroutine nzaeIsStateNull(handle, columnIndex, isNull)
Determines if the state value is NULL at the specified index.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index.
- isNull
(integer) The value is 1 if the state value is NULL; 0 otherwise.
- handle
- Parameters
- subroutine nzaeSaveAggregateResult(handle)
Saves the current aggregate result.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- handle
After setting a state or an output result, before calling nzaeGetNextAggregation, this function must be called, otherwise the result is not be sent to the Netezza software.
- Parameters
- subroutine nzaeSetAggregateBoolean(handle, columnIndex, value)
Sets a state or output value for aggregation.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index to set.
- value
(integer) The aggregate value to set.
- handle
- Parameters
- subroutine nzaeSetAggregateDouble(handle, columnIndex, value)
Sets a state or output value for aggregation.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index to set.
- value
(real*8) The aggregate value to set.
- handle
- Parameters
- subroutine nzaeSetAggregateFloat(handle, columnIndex, value)
Sets a state or output value for aggregation.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index to set.
- value
(integer) The aggregate value to set.
- handle
- Parameters
- subroutine nzaeSetAggregateInt8(handle, columnIndex, value)
Sets a state or output value for aggregation.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index to set.
- value
(integer) The aggregate value to set.
- handle
- Parameters
- subroutine nzaeSetAggregateInt16(handle, columnIndex, value)
Sets a state or output value for aggregation.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index to set.
- value
(integer) The aggregate value to set.
- handle
- Parameters
- subroutine nzaeSetAggregateInt32(handle, columnIndex, value)
Sets a state or output value for aggregation.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index to set.
- value
(integer) The aggregate value to set.
- handle
- Parameters
- subroutine nzaeSetAggregateNull(handle, columnIndex)
Sets a NULL state or output value for aggregation.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index to set.
- handle
- Parameters
- subroutine nzaeSetAggregateString(handle, columnIndex, value)
Sets a state or output value for aggregation.
- Parameters
- handle
(integer) The handle passed to nzaeHandleRequest .
- columnIndex
(integer) The column index to set.
- value
(character*) The aggregate value to set.
- handle
- Parameters