Skip to main content
  • filterByString

    public FilterByStringResponse filterByString(FilterByStringRequest request) throws GPUdbException
    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:
    request - Request object containing the parameters for the operation.
    Returns:
    Response object containing the results of the operation.
    Throws:
    GPUdbException - if an error occurs during the operation.
  • filterByString

    public FilterByStringResponse filterByString(String tableName, String viewName, String expression, String mode, List<String> columnNames, Map<String,String> options) throws GPUdbException
    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:
    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.
    • 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.
    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 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.
    The default value is an empty Map.
    Returns:
    Response object containing the results of the operation.
    Throws:
    GPUdbException - if an error occurs during the operation.