AggregateDefinition
class UserAggregateDefinition extends java.lang.Object implements AggregateDefinition
Modifier and Type | Field | Description |
---|---|---|
private AliasDescriptor |
_alias |
|
private static int |
AGGREGATOR_PARAM_COUNT |
|
private static int |
AGGREGATOR_TYPE |
|
private static java.lang.String |
DERBY_BYTE_ARRAY_NAME |
|
private static int |
INPUT_TYPE |
|
private static int |
RETURN_TYPE |
Constructor | Description |
---|---|
UserAggregateDefinition(AliasDescriptor alias) |
Conjure out of thin air.
|
Modifier and Type | Method | Description |
---|---|---|
private StandardException |
aggregatorInstantiation(java.lang.Throwable t) |
Make a "Could not instantiate aggregator" exception.
|
(package private) ValueNode |
castInputValue(ValueNode inputValue,
ContextManager cm) |
Wrap the input operand in an implicit CAST node as necessary in order to
coerce it the correct type for the aggregator.
|
DataTypeDescriptor |
getAggregator(DataTypeDescriptor inputType,
java.lang.StringBuffer aggregatorClass) |
Determines the result datatype and verifies that the input datatype is correct.
|
AliasDescriptor |
getAliasDescriptor() |
Get the wrapped alias descriptor
|
private java.lang.Class<?> |
getJavaClass(ClassFactory classFactory,
DataTypeDescriptor dtd) |
Get the Java class corresponding to a Derby datatype.
|
private void |
vetCompatibility(java.lang.Class<?> actualClass,
java.lang.Class<?> expectedClass,
java.lang.String sqlState) |
Verify that an actual type is compatible with the expected type.
|
private static final int INPUT_TYPE
private static final int RETURN_TYPE
private static final int AGGREGATOR_TYPE
private static final int AGGREGATOR_PARAM_COUNT
private static final java.lang.String DERBY_BYTE_ARRAY_NAME
private AliasDescriptor _alias
public UserAggregateDefinition(AliasDescriptor alias)
public AliasDescriptor getAliasDescriptor()
public final DataTypeDescriptor getAggregator(DataTypeDescriptor inputType, java.lang.StringBuffer aggregatorClass) throws StandardException
getAggregator
in interface AggregateDefinition
inputType
- the input typeaggregatorClass
- (Output arg) the name of the Derby execution-time class which wraps the aggregate logicStandardException
TypeDescriptor
private void vetCompatibility(java.lang.Class<?> actualClass, java.lang.Class<?> expectedClass, java.lang.String sqlState) throws StandardException
StandardException
final ValueNode castInputValue(ValueNode inputValue, ContextManager cm) throws StandardException
StandardException
private java.lang.Class<?> getJavaClass(ClassFactory classFactory, DataTypeDescriptor dtd) throws StandardException, java.lang.ClassNotFoundException
StandardException
java.lang.ClassNotFoundException
private StandardException aggregatorInstantiation(java.lang.Throwable t)
Apache Derby V10.14 Internals - Copyright © 2004,2018 The Apache Software Foundation. All Rights Reserved.