Package com.gpudb.protocol
Class FilterByStringRequest
- java.lang.Object
-
- com.gpudb.protocol.FilterByStringRequest
-
- All Implemented Interfaces:
org.apache.avro.generic.GenericContainer,org.apache.avro.generic.IndexedRecord
public class FilterByStringRequest extends Object implements org.apache.avro.generic.IndexedRecord
A set of parameters forGPUdb.filterByString.Calculates which objects from a table or view match a string expression for the given string columns. Setting
CASE_SENSITIVEcan modify case sensitivity in matching for all modes exceptSEARCH. ForSEARCHmode details and limitations, see Full Text Search.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFilterByStringRequest.ModeA set of string constants for theFilterByStringRequestparametermode.static classFilterByStringRequest.OptionsA set of string constants for theFilterByStringRequestparameteroptions.
-
Constructor Summary
Constructors Constructor 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.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)Objectget(int index)This method supports the Avro framework and is not intended to be called directly by the user.static org.apache.avro.SchemagetClassSchema()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.StringgetExpression()The expression with which to filter the table.StringgetMode()The string filtering mode to apply.Map<String,String>getOptions()Optional parameters.org.apache.avro.SchemagetSchema()This method supports the Avro framework and is not intended to be called directly by the user.StringgetTableName()Name of the table on which the filter operation will be performed, in [schema_name.]table_name format, using standard name resolution rules.StringgetViewName()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.inthashCode()voidput(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.FilterByStringRequestsetColumnNames(List<String> columnNames)List of columns on which to apply the filter.FilterByStringRequestsetExpression(String expression)The expression with which to filter the table.FilterByStringRequestsetMode(String mode)The string filtering mode to apply.FilterByStringRequestsetOptions(Map<String,String> options)Optional parameters.FilterByStringRequestsetTableName(String tableName)Name of the table on which the filter operation will be performed, in [schema_name.]table_name format, using standard name resolution rules.FilterByStringRequestsetViewName(String 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.StringtoString()
-
-
-
Constructor Detail
-
FilterByStringRequest
public FilterByStringRequest()
Constructs a FilterByStringRequest object with default parameters.
-
FilterByStringRequest
public FilterByStringRequest(String tableName, String viewName, String expression, String mode, List<String> columnNames, Map<String,String> options)
Constructs a FilterByStringRequest object with the specified parameters.- Parameters:
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 incolumnNames; 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 forSEARCHmode.options- Optional parameters.CREATE_TEMP_TABLE: IfTRUE, a unique temporary table name will be generated in the sys_temp schema and used in place ofviewName. This is always allowed even if the caller does not have permission to create tables. The generated name is returned inQUALIFIED_VIEW_NAME. Supported values: The default value isFALSE.COLLECTION_NAME: [DEPRECATED--please specify the containing schema for the view as part ofviewNameand useGPUdb.createSchemato 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: IfFALSEthen string filtering will ignore case. Does not apply toSEARCHmode. Supported values: The default value isTRUE.
Map.
-
-
Method Detail
-
getClassSchema
public static org.apache.avro.Schema getClassSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Returns:
- The schema for the class.
-
getTableName
public String getTableName()
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.- Returns:
- The current value of
tableName.
-
setTableName
public FilterByStringRequest setTableName(String 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.- Parameters:
tableName- The new value fortableName.- Returns:
thisto mimic the builder pattern.
-
getViewName
public String getViewName()
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 ''.- Returns:
- The current value of
viewName.
-
setViewName
public FilterByStringRequest setViewName(String 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 ''.- Parameters:
viewName- The new value forviewName.- Returns:
thisto mimic the builder pattern.
-
getExpression
public String getExpression()
The expression with which to filter the table.- Returns:
- The current value of
expression.
-
setExpression
public FilterByStringRequest setExpression(String expression)
The expression with which to filter the table.- Parameters:
expression- The new value forexpression.- Returns:
thisto mimic the builder pattern.
-
getMode
public String getMode()
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 incolumnNames; 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.
- Returns:
- The current value of
mode.
-
setMode
public FilterByStringRequest setMode(String 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 incolumnNames; 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.
- Parameters:
mode- The new value formode.- Returns:
thisto mimic the builder pattern.
-
getColumnNames
public List<String> getColumnNames()
List of columns on which to apply the filter. Ignored forSEARCHmode.- Returns:
- The current value of
columnNames.
-
setColumnNames
public FilterByStringRequest setColumnNames(List<String> columnNames)
List of columns on which to apply the filter. Ignored forSEARCHmode.- Parameters:
columnNames- The new value forcolumnNames.- Returns:
thisto mimic the builder pattern.
-
getOptions
public Map<String,String> getOptions()
Optional parameters.CREATE_TEMP_TABLE: IfTRUE, a unique temporary table name will be generated in the sys_temp schema and used in place ofviewName. This is always allowed even if the caller does not have permission to create tables. The generated name is returned inQUALIFIED_VIEW_NAME. Supported values: The default value isFALSE.COLLECTION_NAME: [DEPRECATED--please specify the containing schema for the view as part ofviewNameand useGPUdb.createSchemato 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: IfFALSEthen string filtering will ignore case. Does not apply toSEARCHmode. Supported values: The default value isTRUE.
Map.- Returns:
- The current value of
options.
-
setOptions
public FilterByStringRequest setOptions(Map<String,String> options)
Optional parameters.CREATE_TEMP_TABLE: IfTRUE, a unique temporary table name will be generated in the sys_temp schema and used in place ofviewName. This is always allowed even if the caller does not have permission to create tables. The generated name is returned inQUALIFIED_VIEW_NAME. Supported values: The default value isFALSE.COLLECTION_NAME: [DEPRECATED--please specify the containing schema for the view as part ofviewNameand useGPUdb.createSchemato 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: IfFALSEthen string filtering will ignore case. Does not apply toSEARCHmode. Supported values: The default value isTRUE.
Map.- Parameters:
options- The new value foroptions.- Returns:
thisto mimic the builder pattern.
-
getSchema
public org.apache.avro.Schema getSchema()
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getSchemain interfaceorg.apache.avro.generic.GenericContainer- Returns:
- The schema object describing this class.
-
get
public Object get(int index)
This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
getin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to get- Returns:
- value of the field with the given index.
- Throws:
IndexOutOfBoundsException
-
put
public void put(int index, Object value)This method supports the Avro framework and is not intended to be called directly by the user.- Specified by:
putin interfaceorg.apache.avro.generic.IndexedRecord- Parameters:
index- the position of the field to setvalue- the value to set- Throws:
IndexOutOfBoundsException
-
-