Class AggregateHistogramRequest
org.apache.avro.generic.GenericContainer, org.apache.avro.generic.IndexedRecordGPUdb.aggregateHistogram.
Performs a histogram calculation given a table, a column, and an interval function. The interval is used to produce bins of that size and the result, computed over the records falling within each bin, is returned. For each bin, the start value is inclusive, but the end value is exclusive—except for the very last bin for which the end value is also inclusive. The value returned for each bin is the number of records in it, except when a column name is provided as a VALUE_COLUMN. In this latter case the sum of the values corresponding to the VALUE_COLUMN is used as the result instead. The total number of bins requested cannot exceed 10,000.
NOTE: The Kinetica instance being accessed must be running a CUDA (GPU-based) build to service a request that specifies a VALUE_COLUMN.
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classA set of string constants for theAggregateHistogramRequestparameteroptions.Constructor Summary
ConstructorsConstructorDescriptionConstructs an AggregateHistogramRequest object with default parameters.AggregateHistogramRequest(String tableName, String columnName, double start, double end, double interval, Map<String, String> options) Constructs an AggregateHistogramRequest object with the specified parameters.Method Summary
Modifier and TypeMethodDescriptionbooleanget(int index) This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.Name of a column or an expression of one or more column names over which the histogram will be calculated.doublegetEnd()Upper end value of the histogram interval, inclusive.doubleThe size of each bin within the start and end parameters.Optional parameters.org.apache.avro.SchemaThis method supports the Avro framework and is not intended to be called directly by the user.doublegetStart()Lower end value of the histogram interval, inclusive.Name of the table on which the operation will be performed.inthashCode()voidThis method supports the Avro framework and is not intended to be called directly by the user.setColumnName(String columnName) Name of a column or an expression of one or more column names over which the histogram will be calculated.setEnd(double end) Upper end value of the histogram interval, inclusive.setInterval(double interval) The size of each bin within the start and end parameters.setOptions(Map<String, String> options) Optional parameters.setStart(double start) Lower end value of the histogram interval, inclusive.setTableName(String tableName) Name of the table on which the operation will be performed.toString()
Constructor Details
AggregateHistogramRequest
public AggregateHistogramRequest()Constructs an AggregateHistogramRequest object with default parameters.AggregateHistogramRequest
public AggregateHistogramRequest(String tableName, String columnName, double start, double end, double interval, Map<String, String> options) Constructs an AggregateHistogramRequest object with the specified parameters.Parameters:tableName- Name of the table on which the operation will be performed. Must be an existing table, in [schema_name.]table_name format, using standard name resolution rules.columnName- Name of a column or an expression of one or more column names over which the histogram will be calculated.start- Lower end value of the histogram interval, inclusive.end- Upper end value of the histogram interval, inclusive.interval- The size of each bin within the start and end parameters.options- Optional parameters.VALUE_COLUMN: The name of the column to use when calculating the bin values (values are summed). The column must be a numerical type (int, double, long, float).START: The start parameter for char types.END: The end parameter for char types.INTERVAL: The interval parameter for char types.
Map.
Method Details
getClassSchema
public static org.apache.avro.Schema getClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.Returns:The schema for the class.getTableName
Name of the table on which the operation will be performed. Must be an existing table, in [schema_name.]table_name format, using standard name resolution rules.Returns:The current value oftableName.setTableName
Name of the table on which the operation will be performed. Must be an existing table, in [schema_name.]table_name format, using standard name resolution rules.Parameters:tableName- The new value fortableName.Returns:thisto mimic the builder pattern.setColumnName
Name of a column or an expression of one or more column names over which the histogram will be calculated.Parameters:columnName- The new value forcolumnName.Returns:thisto mimic the builder pattern.getStart
public double getStart()Lower end value of the histogram interval, inclusive.Returns:The current value ofstart.setStart
Lower end value of the histogram interval, inclusive.Parameters:start- The new value forstart.Returns:thisto mimic the builder pattern.getEnd
public double getEnd()Upper end value of the histogram interval, inclusive.Returns:The current value ofend.setEnd
Upper end value of the histogram interval, inclusive.Parameters:end- The new value forend.Returns:thisto mimic the builder pattern.getInterval
public double getInterval()The size of each bin within the start and end parameters.Returns:The current value ofinterval.setInterval
The size of each bin within the start and end parameters.Parameters:interval- The new value forinterval.Returns:thisto mimic the builder pattern.getOptions
Optional parameters.VALUE_COLUMN: The name of the column to use when calculating the bin values (values are summed). The column must be a numerical type (int, double, long, float).START: The start parameter for char types.END: The end parameter for char types.INTERVAL: The interval parameter for char types.
Map.Returns:The current value ofoptions.setOptions
Optional parameters.VALUE_COLUMN: The name of the column to use when calculating the bin values (values are summed). The column must be a numerical type (int, double, long, float).START: The start parameter for char types.END: The end parameter for char types.INTERVAL: The interval parameter for char types.
Map.Parameters:options- The new value foroptions.Returns:thisto mimic the builder pattern.getSchema
public org.apache.avro.Schema getSchema()This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getSchemain interfaceorg.apache.avro.generic.GenericContainerReturns:The schema object describing this class.get
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:getin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to getReturns:value of the field with the given index.Throws:put
This method supports the Avro framework and is not intended to be called directly by the user.Specified by:putin interfaceorg.apache.avro.generic.IndexedRecordParameters:index- the position of the field to setvalue- the value to setThrows: