Describes a table-valued input or a table-valued output. More...
#include <sqludr.h>
Public Member Functions | |
| long | getEstimatedNumRows () const |
| long | getEstimatedNumPartitions () const |
| const PartitionInfo & | getQueryPartitioning () const |
| const OrderInfo & | getQueryOrdering () const |
| bool | isStream () const |
| int | getNumConstraints () const |
| const ConstraintInfo & | getConstraint (int i) const |
| void | setEstimatedNumRows (long rows) |
| void | addCardinalityConstraint (const CardinalityConstraintInfo &constraint) |
| void | addUniquenessConstraint (const UniqueConstraintInfo &constraint) |
| void | setIsStream (bool stream) |
| void | print () |
Describes a table-valued input or a table-valued output.
| void TableInfo::addCardinalityConstraint | ( | const CardinalityConstraintInfo & | constraint | ) |
Add a cardinality constraint to the UDF table-valued output.
Only use this method from within the following methods:
| constraint | New constraint to add. The object needs to be deallocated by the caller after this call returns. |
| UDRException |
| void TableInfo::addUniquenessConstraint | ( | const UniqueConstraintInfo & | constraint | ) |
Add a uniqueness constraint to the UDF table-valued output.
Only use this method from within the following methods:
| constraint | New uniqueness constraint to add. The object needs to be deallocated by the caller after this call returns. |
| UDRException |
| const ConstraintInfo & TableInfo::getConstraint | ( | int | i | ) | const |
Get a constraint by index/ordinal number.
| i | index/ordinal (0-based) of the constraint. |
| UDRException |
| long TableInfo::getEstimatedNumPartitions | ( | ) | const |
For tables with a PARTITION BY, get estimated number of partitions.
| long TableInfo::getEstimatedNumRows | ( | ) | const |
Get the estimated number of rows of this table.
| int TableInfo::getNumConstraints | ( | ) | const |
Get the number of constraints defined on this table.
| const OrderInfo & TableInfo::getQueryOrdering | ( | ) | const |
Get the ORDER BY clause for this input table.
This returns either the ORDER BY clause specified in the SQL query, or the updated ordering information, set by UDRInvocationInfo::setChildOrdering(), called during UDR::describeParamsAndColumns().
| const PartitionInfo & TableInfo::getQueryPartitioning | ( | ) | const |
Get the PARTITION BY clause for this input table.
This returns either the PARTITION BY clause specified in the SQL query, or the updated partitioning information, set by UDRInvocationInfo::setChildPartitioning(), called during UDR::describeParamsAndColumns().
| bool TableInfo::isStream | ( | ) | const |
Returns whether the UDF result is treated as a continuous stream.
Note: This is currently not supported. The method always returns false for now.
| void TableInfo::print | ( | ) |
Print the object, for use in debugging.
Reimplemented from tmudr::TupleInfo.
| void TableInfo::setEstimatedNumRows | ( | long | rows | ) |
Set the estimated number of rows for a UDF table-valued result.
Setting this value can help the Trafodion optimizer generate a better plan for queries containing table-valued UDFs. Note that this is only an estimate, a strict correspondence to the actual number of rows returned at runtime is not required.
Only use this method from within the following methods:
| rows | Estimated number of rows for this table. |
| void TableInfo::setIsStream | ( | bool | stream | ) |
Set whether a table should be treated as a stream.
This method is not yet supported.
| stream | true if the table is a stream, false otherwise. |
| UDRException |
1.6.1