Class AggregateHistogramRequest
- java.lang.Object
-
- com.gpudb.protocol.AggregateHistogramRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class AggregateHistogramRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.aggregateHistogram.Performs a histogram calculation given a table, a column, and an interval function. The
intervalis 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 aVALUE_COLUMN. In this latter case the sum of the values corresponding to theVALUE_COLUMNis 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 Classes Modifier and Type Class Description static classAggregateHistogramRequest.OptionsA set of string constants for theAggregateHistogramRequestparameteroptions.
-
Constructor Summary
Constructors Constructor Description AggregateHistogramRequest()Constructs 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetColumnName()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.doublegetInterval()The size of each bin within the start and end parameters.Map<String,String>getOptions()Optional parameters.org.apache.avro.SchemagetSchema()This 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.StringgetTableName()Name of the table on which the operation will be performed.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.AggregateHistogramRequestsetColumnName(String columnName)Name of a column or an expression of one or more column names over which the histogram will be calculated.AggregateHistogramRequestsetEnd(double end)Upper end value of the histogram interval, inclusive.AggregateHistogramRequestsetInterval(double interval)The size of each bin within the start and end parameters.AggregateHistogramRequestsetOptions(Map<String,String> options)Optional parameters.AggregateHistogramRequestsetStart(double start)Lower end value of the histogram interval, inclusive.AggregateHistogramRequestsetTableName(String tableName)Name of the table on which the operation will be performed.StringtoString()
-
-
-
Constructor Detail
-
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 Detail
-
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
public String 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 of
tableName.
-
setTableName
public AggregateHistogramRequest setTableName(String 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.- Parameters:
tableName- The new value fortableName.- Returns:
thisto mimic the builder pattern.
-
getColumnName
public String getColumnName()
Name of a column or an expression of one or more column names over which the histogram will be calculated.- Returns:
- The current value of
columnName.
-
setColumnName
public AggregateHistogramRequest setColumnName(String columnName)
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 of
start.
-
setStart
public AggregateHistogramRequest setStart(double start)
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 of
end.
-
setEnd
public AggregateHistogramRequest setEnd(double end)
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 of
interval.
-
setInterval
public AggregateHistogramRequest setInterval(double interval)
The size of each bin within the start and end parameters.- Parameters:
interval- The new value forinterval.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> 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 of
options.
-
setOptions
public AggregateHistogramRequest setOptions(Map<String,String> 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.- 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.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-