You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafodion.apache.org by "Hans Zeller (JIRA)" <ji...@apache.org> on 2016/05/20 00:49:13 UTC

[jira] [Updated] (TRAFODION-1129) LP Bug: 1439785 - TMUDF: Add an interface that makes it easier to detect partition boundaries

     [ https://issues.apache.org/jira/browse/TRAFODION-1129?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hans Zeller updated TRAFODION-1129:
-----------------------------------
    Issue Type: New Feature  (was: Bug)

> LP Bug: 1439785 - TMUDF: Add an interface that makes it easier to detect partition boundaries
> ---------------------------------------------------------------------------------------------
>
>                 Key: TRAFODION-1129
>                 URL: https://issues.apache.org/jira/browse/TRAFODION-1129
>             Project: Apache Trafodion
>          Issue Type: New Feature
>          Components: sql-cmp
>            Reporter: Hans Zeller
>            Assignee: Hans Zeller
>
> 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::getNextPartition() and UDF::getNextRowInPartition() as an alternative to UDF::getNextRow(). These methods should read only rows within the partition and  keep the passthrough columns available when we reach the end of the partition. A TMUDF utilizing partitions could then look like this:
> while (getNextPartition(info))
>   {
>     while (getNextRowInPartition(info))
>       {
>         // 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.copyPassThruData();
>     // emit final row for this partition
>     emitRow();
>   } // loop over partitions



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)