public class FilterByStringRequest extends Object implements org.apache.avro.generic.IndexedRecord
GPUdb.filterByString
.
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
A set of string constants for the
FilterByStringRequest
parameter mode . |
static class |
FilterByStringRequest.Options
A set of string constants for the
FilterByStringRequest
parameter options . |
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()
List of columns on which to apply the filter.
|
||||
String |
getExpression()
The expression with which to filter the table.
|
||||
String |
getMode()
The string filtering mode to apply.
|
||||
Map<String,String> |
getOptions()
Optional parameters.
|
||||
org.apache.avro.Schema |
getSchema()
This method supports the Avro framework and is not intended to be called
directly by the user.
|
||||
String |
getTableName()
Name of the table on which the filter operation will be performed, in
[schema_name.]table_name format, using standard
String getViewName()
If provided, then this will be the name of the view containing the
results, in [schema_name.]view_name format, using standard
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)
List of columns on which to apply the filter.
|
||||
FilterByStringRequest |
setExpression(String expression)
The expression with which to filter the table.
|
||||
FilterByStringRequest |
setMode(String mode)
The string filtering mode to apply.
|
||||
FilterByStringRequest |
setOptions(Map<String,String> options)
Optional parameters.
|
||||
FilterByStringRequest |
setTableName(String tableName)
Name of the table on which the filter operation will be performed, in
[schema_name.]table_name format, using standard
FilterByStringRequest setViewName(String viewName)
|
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
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()
tableName
.public FilterByStringRequest setTableName(String tableName)
tableName
- The new value for tableName
.this
to mimic the builder pattern.public String getViewName()
viewName
.public FilterByStringRequest setViewName(String viewName)
viewName
- The new value for viewName
.this
to mimic the builder pattern.public String getExpression()
expression
.public FilterByStringRequest setExpression(String expression)
expression
- The new value for expression
.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.
mode
.public FilterByStringRequest setMode(String mode)
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.
mode
- The new value for mode
.this
to mimic the builder pattern.public List<String> getColumnNames()
SEARCH
mode.columnNames
.public FilterByStringRequest setColumnNames(List<String> columnNames)
SEARCH
mode.columnNames
- The new value for columnNames
.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
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
.options
.public FilterByStringRequest setOptions(Map<String,String> options)
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
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
.options
- The new value for options
.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 © 2025. All rights reserved.