DSIExtAggregateFunction Class Reference

An abstract class that represents a custom aggregate function from the DSII. More...

Inherits Simba::Support::UnsafeSharedObject.

List of all members.

Public Member Functions

virtual void GetFunctionName (simba_wstring &out_aggrName) const =0
 Get the name of the aggregate function.
virtual const std::vector
< SqlTypeMetadata * > & 
GetInputMetadata ()=0
 Retrieve the metadata representing the inputs to the aggregate function.
virtual SqlTypeMetadataGetOutputMetadata ()=0
 Retrieve the metadata representing the output of the aggregate function.
virtual
Simba::SQLEngine::SESetQuantifier 
GetSetQuantifier () const =0
 This method returns the set quantifier id.
virtual bool UpdateMetadata (const std::vector< SqlTypeMetadata * > &in_inputMetadata, bool in_isPrepare)=0
 Update the expected input and return metadata for the aggregate function based on the input metadata.
virtual ~DSIExtAggregateFunction ()
 Destructor.

Protected Member Functions

 DSIExtAggregateFunction ()
 Constructor.

Detailed Description

An abstract class that represents a custom aggregate function from the DSII.

Custom aggregates are not currently supported for execution, only preparation. To handle execution of custom aggregates, CQE for aggregates must be used. See IAggregationHandler.h for more information.


Constructor & Destructor Documentation

virtual ~DSIExtAggregateFunction (  )  [inline, virtual]

Destructor.

DSIExtAggregateFunction (  )  [inline, protected]

Constructor.


Member Function Documentation

virtual void GetFunctionName ( simba_wstring out_aggrName  )  const [pure virtual]

Get the name of the aggregate function.

Parameters:
out_aggrName The name of the aggregate function.
virtual const std::vector<SqlTypeMetadata*>& GetInputMetadata (  )  [pure virtual]

Retrieve the metadata representing the inputs to the aggregate function.

Note that there must be at least one entry in the returned collection. Note also that there is currently a restriction that only one input may be used.

Returns:
The set of metadata representing the inputs to the aggregate function. (NOT OWN)
virtual SqlTypeMetadata* GetOutputMetadata (  )  [pure virtual]

Retrieve the metadata representing the output of the aggregate function.

Returns:
The metadata for the output of the aggregate function. (NOT OWN)
virtual Simba::SQLEngine::SESetQuantifier GetSetQuantifier (  )  const [pure virtual]

This method returns the set quantifier id.

Returns:
The set quantifier id.
virtual bool UpdateMetadata ( const std::vector< SqlTypeMetadata * > &  in_inputMetadata,
bool  in_isPrepare 
) [pure virtual]

Update the expected input and return metadata for the aggregate function based on the input metadata.

This function will be called at least twice, once during the preparation phase when metadata may be inaccurate due to parameters, and one or more times during execution when metadata will be accurate as parameters will have been bound.

This function will allow the aggregate function implementation to change the output metadata as well as the expected input metadata for the aggregate function if needed, however if the expected input and output metadata doesn't change based on inputs, this function can do nothing.

This function will also allow the implementation to validate the types of the input metadata to reject types that are not expected to work. For instance, if the aggregate function should only accept numeric types as input, this function could throw an exception to reject non-numeric inputs. Note that this should only happen on the second call at execution time, as at prepare time the metadata may be inaccurate. If the implementation does not do validation of types, then the SQLEngine will attempt to convert input data to match the type reported for the input argument.

Parameters:
in_inputMetadata The current metadata for each of the inputs to the aggregate function. The index of the metadata corresponds directly to the input into the aggregate function. (NOT OWN)
in_isPrepare Flag indicating if this is a prepare metadata call, in which case the input metadata may not be accurate, or an execute metadata call, when the input metadata will be accurate.
Returns:
True if the output metadata was updated; false otherwise.

The documentation for this class was generated from the following file:

Generated on Wed May 17 14:21:17 2017 for SimbaEngine 10.1.3.1011 by simba