Skip to content

Commit

Permalink
builtins: add unimplemented errors for full text search builtins
Browse files Browse the repository at this point in the history
Release note: None
  • Loading branch information
otan committed Sep 18, 2020
1 parent 38cc898 commit b87de7c
Showing 1 changed file with 45 additions and 13 deletions.
58 changes: 45 additions & 13 deletions pkg/sql/sem/builtins/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,19 +85,20 @@ const maxAllocatedStringSize = 128 * 1024 * 1024
const errInsufficientArgsFmtString = "unknown signature: %s()"

const (
categoryArray = "Array"
categoryComparison = "Comparison"
categoryCompatibility = "Compatibility"
categoryDateAndTime = "Date and time"
categoryEnum = "Enum"
categoryGenerator = "Set-returning"
categorySpatial = "Spatial"
categoryIDGeneration = "ID generation"
categoryJSON = "JSONB"
categoryMultiTenancy = "Multi-tenancy"
categorySequences = "Sequence"
categoryString = "String and byte"
categorySystemInfo = "System info"
categoryArray = "Array"
categoryComparison = "Comparison"
categoryCompatibility = "Compatibility"
categoryDateAndTime = "Date and time"
categoryEnum = "Enum"
categoryFullTextSearch = "Full Text Search"
categoryGenerator = "Set-returning"
categorySpatial = "Spatial"
categoryIDGeneration = "ID generation"
categoryJSON = "JSONB"
categoryMultiTenancy = "Multi-tenancy"
categorySequences = "Sequence"
categoryString = "String and byte"
categorySystemInfo = "System info"
)

func categorizeType(t *types.T) string {
Expand Down Expand Up @@ -2849,6 +2850,37 @@ may increase either contention or retry errors, or both.`,
}
})),

// Full text search functions.
"ts_match_qv": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"ts_match_vq": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"tsvector_cmp": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"tsvector_concat": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"ts_debug": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"ts_headline": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"ts_lexize": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"websearch_to_tsquery": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"array_to_tsvector": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"get_current_ts_config": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"numnode": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"plainto_tsquery": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"phraseto_tsquery": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"querytree": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"setweight": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"strip": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"to_tsquery": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"to_tsvector": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"json_to_tsvector": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"jsonb_to_tsvector": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"ts_delete": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"ts_filter": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"ts_rank": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"ts_rank_cd": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"ts_rewrite": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"tsquery_phrase": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"tsvector_to_array": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"tsvector_update_trigger": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),
"tsvector_update_trigger_column": makeBuiltin(tree.FunctionProperties{UnsupportedWithIssue: 7821, Category: categoryFullTextSearch}),

// JSON functions.
// The behavior of both the JSON and JSONB data types in CockroachDB is
// similar to the behavior of the JSONB data type in Postgres.
Expand Down

0 comments on commit b87de7c

Please sign in to comment.