public class FilterByTableRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.filterByTable(FilterByTableRequest)
.
Filters objects in one table based on objects in another table. The user
must specify matching column types from the two tables (i.e. the target
table from which objects will be filtered and the source table based on
which the filter will be created); the column names need not be the same. If
a viewName
is specified, then the filtered objects will then be put
in a newly created view. The operation is synchronous, meaning that a
response will not be returned until all objects are fully available in the
result view. The return value contains the count (i.e. the size) of the
resulting view.
Modifier and Type | Class and Description |
---|---|
static class |
FilterByTableRequest.Options
Optional parameters.
|
Constructor and Description |
---|
FilterByTableRequest()
Constructs a FilterByTableRequest object with default parameters.
|
FilterByTableRequest(String tableName,
String viewName,
String columnName,
String sourceTableName,
String sourceTableColumnName,
Map<String,String> options)
Constructs a FilterByTableRequest 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() |
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.
|
String |
getSourceTableColumnName() |
String |
getSourceTableName() |
String |
getTableName() |
String |
getViewName() |
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.
|
FilterByTableRequest |
setColumnName(String columnName) |
FilterByTableRequest |
setOptions(Map<String,String> options) |
FilterByTableRequest |
setSourceTableColumnName(String sourceTableColumnName) |
FilterByTableRequest |
setSourceTableName(String sourceTableName) |
FilterByTableRequest |
setTableName(String tableName) |
FilterByTableRequest |
setViewName(String viewName) |
String |
toString() |
public FilterByTableRequest()
public FilterByTableRequest(String tableName, String viewName, String columnName, String sourceTableName, String sourceTableColumnName, Map<String,String> options)
tableName
- Name of the table whose data will be filtered. Must be
an existing table.viewName
- If provided, then this will be the name of the view
containing the results. Has the same naming
restrictions as tables. The default value is ''.columnName
- Name of the column by whose value the data will be
filtered from the table designated by tableName
.sourceTableName
- Name of the table whose data will be compared
against in the table called tableName
.
Must be an existing table.sourceTableColumnName
- Name of the column in the sourceTableName
whose values will be used
as the filter for table tableName
.
Must be a geospatial geometry column if in
'spatial' mode; otherwise, Must match the
type of the columnName
.options
- Optional parameters.
COLLECTION_NAME
: Name of a collection which is to
contain the newly created view. If the collection
provided is non-existent, the collection will be
automatically created. If empty, then the newly created
view will be top-level.
FILTER_MODE
: String indicating the filter mode, either
in_table
or not_in_table
.
Supported values:
The default value is IN_TABLE
.
MODE
: Mode - should be either spatial
or normal
.
Supported values:
The default value is NORMAL
.
BUFFER
: Buffer size, in meters. Only relevant for
spatial
mode. The default value is '0'.
BUFFER_METHOD
: Method used to buffer polygons. Only
relevant for spatial
mode.
Supported values:
The default value is NORMAL
.
MAX_PARTITION_SIZE
: Maximum number of points in a
partition. Only relevant for spatial
mode. The
default value is '0'.
MAX_PARTITION_SCORE
: Maximum number of points * edges
in a partition. Only relevant for spatial
mode.
The default value is '8000000'.
X_COLUMN_NAME
: Name of column containing x value of
point being filtered in spatial
mode. The
default value is 'x'.
Y_COLUMN_NAME
: Name of column containing y value of
point being filtered in spatial
mode. The
default value is 'y'.
Map
.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public FilterByTableRequest setTableName(String tableName)
tableName
- Name of the table whose data will be filtered. Must be
an existing table.this
to mimic the builder pattern.public String getViewName()
public FilterByTableRequest setViewName(String viewName)
viewName
- If provided, then this will be the name of the view
containing the results. Has the same naming
restrictions as tables. The default value is ''.this
to mimic the builder pattern.public String getColumnName()
tableName
.public FilterByTableRequest setColumnName(String columnName)
columnName
- Name of the column by whose value the data will be
filtered from the table designated by tableName
.this
to mimic the builder pattern.public String getSourceTableName()
tableName
. Must be an existing table.public FilterByTableRequest setSourceTableName(String sourceTableName)
sourceTableName
- Name of the table whose data will be compared
against in the table called tableName
.
Must be an existing table.this
to mimic the builder pattern.public String getSourceTableColumnName()
sourceTableName
whose values
will be used as the filter for table tableName
. Must be
a geospatial geometry column if in 'spatial' mode; otherwise,
Must match the type of the columnName
.public FilterByTableRequest setSourceTableColumnName(String sourceTableColumnName)
sourceTableColumnName
- Name of the column in the sourceTableName
whose values will be used
as the filter for table tableName
.
Must be a geospatial geometry column if in
'spatial' mode; otherwise, Must match the
type of the columnName
.this
to mimic the builder pattern.public Map<String,String> getOptions()
COLLECTION_NAME
: Name of a collection which is to contain the
newly created view. If the collection provided is non-existent,
the collection will be automatically created. If empty, then the
newly created view will be top-level.
FILTER_MODE
: String indicating the filter mode, either in_table
or not_in_table
.
Supported values:
The default value is IN_TABLE
.
MODE
: Mode
- should be either spatial
or normal
.
Supported values:
The default value is NORMAL
.
BUFFER
:
Buffer size, in meters. Only relevant for spatial
mode.
The default value is '0'.
BUFFER_METHOD
: Method used to buffer polygons. Only relevant
for spatial
mode.
Supported values:
The default value is NORMAL
.
MAX_PARTITION_SIZE
: Maximum number of points in a partition.
Only relevant for spatial
mode. The default value is
'0'.
MAX_PARTITION_SCORE
: Maximum number of points * edges in a
partition. Only relevant for spatial
mode. The default
value is '8000000'.
X_COLUMN_NAME
: Name of column containing x value of point being
filtered in spatial
mode. The default value is 'x'.
Y_COLUMN_NAME
: Name of column containing y value of point being
filtered in spatial
mode. The default value is 'y'.
Map
.public FilterByTableRequest setOptions(Map<String,String> options)
options
- Optional parameters.
COLLECTION_NAME
: Name of a collection which is to
contain the newly created view. If the collection
provided is non-existent, the collection will be
automatically created. If empty, then the newly created
view will be top-level.
FILTER_MODE
: String indicating the filter mode, either
in_table
or not_in_table
.
Supported values:
The default value is IN_TABLE
.
MODE
: Mode - should be either spatial
or normal
.
Supported values:
The default value is NORMAL
.
BUFFER
: Buffer size, in meters. Only relevant for
spatial
mode. The default value is '0'.
BUFFER_METHOD
: Method used to buffer polygons. Only
relevant for spatial
mode.
Supported values:
The default value is NORMAL
.
MAX_PARTITION_SIZE
: Maximum number of points in a
partition. Only relevant for spatial
mode. The
default value is '0'.
MAX_PARTITION_SCORE
: Maximum number of points * edges
in a partition. Only relevant for spatial
mode.
The default value is '8000000'.
X_COLUMN_NAME
: Name of column containing x value of
point being filtered in spatial
mode. The
default value is 'x'.
Y_COLUMN_NAME
: Name of column containing y value of
point being filtered in spatial
mode. The
default value is 'y'.
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 © 2019. All rights reserved.