From b87de7cf3173750f6fa491e6c2ab86b131d87100 Mon Sep 17 00:00:00 2001 From: Oliver Tan Date: Fri, 18 Sep 2020 10:27:03 -0700 Subject: [PATCH] builtins: add unimplemented errors for full text search builtins Release note: None --- pkg/sql/sem/builtins/builtins.go | 58 +++++++++++++++++++++++++------- 1 file changed, 45 insertions(+), 13 deletions(-) diff --git a/pkg/sql/sem/builtins/builtins.go b/pkg/sql/sem/builtins/builtins.go index 4a02491a31f1..82ab34b1b812 100644 --- a/pkg/sql/sem/builtins/builtins.go +++ b/pkg/sql/sem/builtins/builtins.go @@ -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 { @@ -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.