This project has retired. For details please refer to its Attic page.
tmudr: tmudr::TableInfo Class Reference

tmudr::TableInfo Class Reference

Describes a table-valued input or a table-valued output. More...

#include <sqludr.h>

Inheritance diagram for tmudr::TableInfo:
tmudr::TupleInfo

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 ()

Detailed Description

Describes a table-valued input or a table-valued output.


Member Function Documentation

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:

Parameters:
constraint New constraint to add. The object needs to be deallocated by the caller after this call returns.
Exceptions:
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:

Parameters:
constraint New uniqueness constraint to add. The object needs to be deallocated by the caller after this call returns.
Exceptions:
UDRException 
const ConstraintInfo & TableInfo::getConstraint ( int  i  )  const

Get a constraint by index/ordinal number.

Parameters:
i index/ordinal (0-based) of the constraint.
Returns:
Constraint for a given index/ordinal.
Exceptions:
UDRException 
long TableInfo::getEstimatedNumPartitions (  )  const

For tables with a PARTITION BY, get estimated number of partitions.

See also:
getEstimatedNumRows()
setEstimatedNumRows()
Returns:
Estimated number of partitions or -1 if there is no estimate or no PARTITION BY.
long TableInfo::getEstimatedNumRows (  )  const

Get the estimated number of rows of this table.

See also:
setEstimatedNumRows()
getEstimatedNumPartitions()
Returns:
Estimated number of rows or -1 if there is no estimate.
int TableInfo::getNumConstraints (  )  const

Get the number of constraints defined on this table.

Returns:
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().

Returns:
Ordering clause for this input table.
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().

Returns:
Partitioning clause for this input table.
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.

Returns:
true if the UDF result is a stream, false otherwise.
void TableInfo::print (  ) 

Print the object, for use in debugging.

See also:
UDR::debugLoop()
UDRInvocationInfo::PRINT_INVOCATION_INFO_AT_RUN_TIME

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:

Parameters:
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.

Parameters:
stream true if the table is a stream, false otherwise.
Exceptions:
UDRException 

The documentation for this class was generated from the following files:
 All Data Structures Functions Enumerations Enumerator

Generated on 31 Aug 2016 for tmudr by  doxygen 1.6.1