public class AggregateHistogramRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.aggregateHistogram(AggregateHistogramRequest)
.
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
option.
Modifier and Type | Class and Description |
---|---|
static class |
AggregateHistogramRequest.Options
Optional parameters.
|
Constructor and 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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
Object |
get(int index)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
static org.apache.avro.Schema |
getClassSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
String |
getColumnName() |
double |
getEnd() |
double |
getInterval() |
Map<String,String> |
getOptions() |
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
double |
getStart() |
String |
getTableName() |
int |
hashCode() |
void |
put(int index,
Object value)
This method supports the Avro framework and is not intended to be called
directly by the user.
|
AggregateHistogramRequest |
setColumnName(String columnName) |
AggregateHistogramRequest |
setEnd(double end) |
AggregateHistogramRequest |
setInterval(double interval) |
AggregateHistogramRequest |
setOptions(Map<String,String> options) |
AggregateHistogramRequest |
setStart(double start) |
AggregateHistogramRequest |
setTableName(String tableName) |
String |
toString() |
public AggregateHistogramRequest()
public AggregateHistogramRequest(String tableName, String columnName, double start, double end, double interval, Map<String,String> options)
tableName
- Name of the table on which the operation will be
performed. Must be an existing table or collection.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).
Map
.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public AggregateHistogramRequest setTableName(String tableName)
tableName
- Name of the table on which the operation will be
performed. Must be an existing table or collection.this
to mimic the builder pattern.public String getColumnName()
public AggregateHistogramRequest setColumnName(String columnName)
columnName
- Name of a column or an expression of one or more
column names over which the histogram will be
calculated.this
to mimic the builder pattern.public double getStart()
public AggregateHistogramRequest setStart(double start)
start
- Lower end value of the histogram interval, inclusive.this
to mimic the builder pattern.public double getEnd()
public AggregateHistogramRequest setEnd(double end)
end
- Upper end value of the histogram interval, inclusive.this
to mimic the builder pattern.public double getInterval()
public AggregateHistogramRequest setInterval(double interval)
interval
- The size of each bin within the start and end
parameters.this
to mimic the builder pattern.public Map<String,String> getOptions()
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).
Map
.public AggregateHistogramRequest setOptions(Map<String,String> options)
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).
Map
.this
to mimic the builder pattern.public org.apache.avro.Schema getSchema()
getSchema
in interface org.apache.avro.generic.GenericContainer
public Object get(int index)
get
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to getIndexOutOfBoundsException
public void put(int index, Object value)
put
in interface org.apache.avro.generic.IndexedRecord
index
- the position of the field to setvalue
- the value to setIndexOutOfBoundsException
Copyright © 2020. All rights reserved.