public class FilterByStringRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.filterByString(FilterByStringRequest)
.
Calculates which objects from a table, collection, or view match a string expression for the given string columns. The options 'case_sensitive' can be used to modify the behavior for all modes except 'search'. For 'search' mode details and limitations, see Full Text Search.
Modifier and Type | Class and Description |
---|---|
static class |
FilterByStringRequest.Mode
The string filtering mode to apply.
|
static class |
FilterByStringRequest.Options
Optional parameters.
|
Constructor and Description |
---|
FilterByStringRequest()
Constructs a FilterByStringRequest object with default parameters.
|
FilterByStringRequest(String tableName,
String viewName,
String expression,
String mode,
List<String> columnNames,
Map<String,String> options)
Constructs a FilterByStringRequest 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.
|
List<String> |
getColumnNames() |
String |
getExpression() |
String |
getMode() |
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 |
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.
|
FilterByStringRequest |
setColumnNames(List<String> columnNames) |
FilterByStringRequest |
setExpression(String expression) |
FilterByStringRequest |
setMode(String mode) |
FilterByStringRequest |
setOptions(Map<String,String> options) |
FilterByStringRequest |
setTableName(String tableName) |
FilterByStringRequest |
setViewName(String viewName) |
String |
toString() |
public FilterByStringRequest()
public FilterByStringRequest(String tableName, String viewName, String expression, String mode, List<String> columnNames, Map<String,String> options)
tableName
- Name of the table on which the filter operation will
be performed. Must be an existing table, collection
or view.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 ''.expression
- The expression with which to filter the table.mode
- The string filtering mode to apply. See below for details.
Supported values:
SEARCH
: Full text search query with wildcards and boolean
operators. Note that for this mode, no column can be
specified in columnNames
; all string columns of the
table that have text search enabled will be searched.
EQUALS
: Exact whole-string match (accelerated).
CONTAINS
: Partial substring match (not accelerated). If
the column is a string type (non-charN) and the number of
records is too large, it will return 0.
STARTS_WITH
: Strings that start with the given expression
(not accelerated). If the column is a string type
(non-charN) and the number of records is too large, it will
return 0.
REGEX
:
Full regular expression search (not accelerated). If the
column is a string type (non-charN) and the number of
records is too large, it will return 0.
columnNames
- List of columns on which to apply the filter.
Ignored for 'search' mode.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.
CASE_SENSITIVE
: If 'false' then string filtering will
ignore case. Does not apply to 'search' mode.
Supported values:
The default value is TRUE
.
Map
.public static org.apache.avro.Schema getClassSchema()
public String getTableName()
public FilterByStringRequest setTableName(String tableName)
tableName
- Name of the table on which the filter operation will
be performed. Must be an existing table, collection
or view.this
to mimic the builder pattern.public String getViewName()
public FilterByStringRequest 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 getExpression()
public FilterByStringRequest setExpression(String expression)
expression
- The expression with which to filter the table.this
to mimic the builder pattern.public String getMode()
SEARCH
:
Full text search query with wildcards and boolean operators.
Note that for this mode, no column can be specified in columnNames
; all string columns of the table that have text
search enabled will be searched.
EQUALS
:
Exact whole-string match (accelerated).
CONTAINS
: Partial substring match (not accelerated). If the
column is a string type (non-charN) and the number of records is
too large, it will return 0.
STARTS_WITH
: Strings that start with the given expression (not
accelerated). If the column is a string type (non-charN) and the
number of records is too large, it will return 0.
REGEX
: Full
regular expression search (not accelerated). If the column is a
string type (non-charN) and the number of records is too large,
it will return 0.
public FilterByStringRequest setMode(String mode)
mode
- The string filtering mode to apply. See below for details.
Supported values:
SEARCH
: Full text search query with wildcards and boolean
operators. Note that for this mode, no column can be
specified in columnNames
; all string columns of the
table that have text search enabled will be searched.
EQUALS
: Exact whole-string match (accelerated).
CONTAINS
: Partial substring match (not accelerated). If
the column is a string type (non-charN) and the number of
records is too large, it will return 0.
STARTS_WITH
: Strings that start with the given expression
(not accelerated). If the column is a string type
(non-charN) and the number of records is too large, it will
return 0.
REGEX
:
Full regular expression search (not accelerated). If the
column is a string type (non-charN) and the number of
records is too large, it will return 0.
this
to mimic the builder pattern.public List<String> getColumnNames()
public FilterByStringRequest setColumnNames(List<String> columnNames)
columnNames
- List of columns on which to apply the filter.
Ignored for 'search' mode.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.
CASE_SENSITIVE
: If 'false' then string filtering will ignore
case. Does not apply to 'search' mode.
Supported values:
The default value is TRUE
.
Map
.public FilterByStringRequest 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.
CASE_SENSITIVE
: If 'false' then string filtering will
ignore case. Does not apply to 'search' mode.
Supported values:
The default value is TRUE
.
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.