Skip to main content

◆ filterByString() [1/4]

FilterByStringResponse gpudb::GPUdb::filterByString (const FilterByStringRequest &request_) const

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.

Parameters
[in]request_Request object containing the parameters for the operation.
Returns
Response object containing the result of the operation.

◆ filterByString() [2/4]

FilterByStringResponse & gpudb::GPUdb::filterByString (const FilterByStringRequest &request_,
FilterByStringResponse &response_ ) const

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.

Parameters
[in]request_Request object containing the parameters for the operation.
[out]response_Response object containing the results of the operation.
Returns
Response object containing the result of the operation (initially passed in by reference).

◆ filterByString() [3/4]

FilterByStringResponse gpudb::GPUdb::filterByString (const std::string &tableName,
const std::string &viewName,
const std::string &expression,
const std::string &mode,
const std::vector< std::string > &columnNames,
const std::map< std::string, std::string > &options ) const

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.

Parameters
[in]tableNameName 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.
[in]viewNameIf 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 ”.
[in]expressionThe expression with which to filter the table.
[in]modeThe string filtering mode to apply. See below for details. Supported values:
  • filter_by_string_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.
  • filter_by_string_equals: Exact whole-string match (accelerated).
  • filter_by_string_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.
  • filter_by_string_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.
  • filter_by_string_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.
  • filter_by_string_search_stats: Cross-shard BM25 corpus statistics for one (column, query) pair. Returns the merged BM25 statistics (max_doc, doc_count, sum_total_term_freq, per-term doc_freq / total_term_freq) needed by callers that score documents themselves (e.g. text_match_bm25_global SQL function pre-pass). Requires column_names to contain exactly one column with text search enabled. The view_name field is ignored — this mode does not produce a result table.
[in]columnNamesList of columns on which to apply the filter. Ignored for search mode.
[in]optionsOptional parameters.The default value is an empty map.
Returns
Response object containing the result of the operation.

◆ filterByString() [4/4]

FilterByStringResponse & gpudb::GPUdb::filterByString (const std::string &tableName,
const std::string &viewName,
const std::string &expression,
const std::string &mode,
const std::vector< std::string > &columnNames,
const std::map< std::string, std::string > &options,
FilterByStringResponse &response_ ) const

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.

Parameters
[in]tableNameName 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.
[in]viewNameIf 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 ”.
[in]expressionThe expression with which to filter the table.
[in]modeThe string filtering mode to apply. See below for details. Supported values:
  • filter_by_string_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.
  • filter_by_string_equals: Exact whole-string match (accelerated).
  • filter_by_string_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.
  • filter_by_string_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.
  • filter_by_string_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.
  • filter_by_string_search_stats: Cross-shard BM25 corpus statistics for one (column, query) pair. Returns the merged BM25 statistics (max_doc, doc_count, sum_total_term_freq, per-term doc_freq / total_term_freq) needed by callers that score documents themselves (e.g. text_match_bm25_global SQL function pre-pass). Requires column_names to contain exactly one column with text search enabled. The view_name field is ignored — this mode does not produce a result table.
[in]columnNamesList of columns on which to apply the filter. Ignored for search mode.
[in]optionsOptional parameters.The default value is an empty map.
[out]response_Response object containing the results of the operation.
Returns
Response object containing the result of the operation (initially passed in by reference).