FNC_Context_t Fields | Window Aggregate Functions | Teradata Vantage - FNC_Context_t Fields - Analytics Database - Teradata Vantage

SQL External Routine Programming

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
ft:locale
en-US
ft:lastEdition
2025-03-30
dita:mapPath
iiv1628111441820.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
qnu1472247494689
lifecycle
latest
Product Category
Teradata Vantageā„¢

The following table identifies the FNC_Context_t fields that are used by window aggregate functions. A field not listed in the table is not applicable for window aggregate functions or is reserved for future use.

Fields Specifies
version Version of context structure.
interim1 Pointer to aggregate storage area that saves intermediate results.
intrm1_length Length of interim1.
window_size
Window Type Value
Cumulative -1
Reporting -2
Moving post_window -pre_window+1 (+1 for the current row)
pre_window Part of PRECEDING clause. Value is negative for row that precedes current row.

Not applicable for cumulative and reporting window types. Its initial value is zero in those cases.

post_window Part of FOLLOWING clause. Value is positive for row that follows current row.

Not applicable for cumulative and reporting window types. Its initial value is zero in those cases.

Vantage sets up the following fields prior to invoking the function. The fields are used to define a window of rows for the function to operate on.
  • window_size
  • pre_window
  • post_window