public class FilterByStringRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.filterByString(FilterByStringRequest)
.
Calculates which objects from a table or view match a string
expression for the given string columns. Setting
case_sensitive
can modify case sensitivity in matching
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, in [schema_name.]table_name format,
using standard name resolution rules. Must be an
existing table or view.viewName
- If provided, then this will be the name of the view
containing the results, in [schema_name.]view_name
format, using standard name resolution rules and meeting table naming criteria. Must not be
an already existing table or view. 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.
CREATE_TEMP_TABLE
: If true
, a unique temporary
table name will be generated in the sys_temp schema and
used in place of viewName
. This is always
allowed even if the caller does not have permission to
create tables. The generated name is returned in qualified_view_name
.
Supported values:
The default value is FALSE
.
COLLECTION_NAME
: [DEPRECATED--please specify the
containing schema for the view as part of viewName
and use GPUdb.createSchema(CreateSchemaRequest)
to
create the schema if non-existent] Name of a schema for
the newly created view. If the schema is non-existent,
it will be automatically created.
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, in [schema_name.]table_name format,
using standard name resolution rules. Must be an
existing table 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, in [schema_name.]view_name
format, using standard name resolution rules and meeting table naming criteria. Must not be
an already existing table or view. 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()
search
mode.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()
CREATE_TEMP_TABLE
: If true
, a unique temporary table
name will be generated in the sys_temp schema and used in place
of viewName
. This is always allowed even if the caller
does not have permission to create tables. The generated name is
returned in qualified_view_name
.
Supported values:
The default value is FALSE
.
COLLECTION_NAME
: [DEPRECATED--please specify the containing
schema for the view as part of viewName
and use GPUdb.createSchema(CreateSchemaRequest)
to create the
schema if non-existent] Name of a schema for the newly created
view. If the schema is non-existent, it will be automatically
created.
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.
CREATE_TEMP_TABLE
: If true
, a unique temporary
table name will be generated in the sys_temp schema and
used in place of viewName
. This is always
allowed even if the caller does not have permission to
create tables. The generated name is returned in qualified_view_name
.
Supported values:
The default value is FALSE
.
COLLECTION_NAME
: [DEPRECATED--please specify the
containing schema for the view as part of viewName
and use GPUdb.createSchema(CreateSchemaRequest)
to
create the schema if non-existent] Name of a schema for
the newly created view. If the schema is non-existent,
it will be automatically created.
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 © 2024. All rights reserved.