TMUDF: Add an interface that makes it easier to detect partition boundaries
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Trafodion |
New
|
Medium
|
Hans Zeller |
Bug Description
Right now, a TMUDF needs to implement its own code to detect when one partition (defined by the PARTITION BY clause of a table-valued input) ends and the next one begins. Another problem is that it knows that only after it has read the first row of the next partition or encountered EOD. That makes it hard to use passthrough columns in a reducer, because those passthrough columns are not longer available when we detect the end of the partition.
Ideally, we should add two new methods UDF::getNextPar
while (getNextPartiti
{
while (getNextRowInPa
{
// process the row, could emit rows or accumulate information
} // loop over rows in partition
// finalize information
// copy passthru columns, those are still available in this model
info.
// emit final row for this partition
emitRow();
} // loop over partitions
Changed in trafodion: | |
importance: | Wishlist → Medium |