Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release-22.1: sql/sem/builtins: add multi-region functions to distsql blocklist #86795

Merged
merged 1 commit into from
Aug 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 24 additions & 6 deletions pkg/sql/sem/builtins/builtins.go
Original file line number Diff line number Diff line change
Expand Up @@ -6285,7 +6285,10 @@ the locality flag on node startup. Returns an error if no region is set.`,
},
),
DefaultToDatabasePrimaryRegionBuiltinName: makeBuiltin(
tree.FunctionProperties{Category: categoryMultiRegion},
tree.FunctionProperties{
Category: categoryMultiRegion,
DistsqlBlocklist: true, // applicable only on the gateway
},
stringOverload1(
func(evalCtx *tree.EvalContext, s string) (tree.Datum, error) {
regionConfig, err := evalCtx.Regions.CurrentDatabaseRegionConfig(evalCtx.Context)
Expand Down Expand Up @@ -6313,7 +6316,10 @@ the locality flag on node startup. Returns an error if no region is set.`,
),
),
RehomeRowBuiltinName: makeBuiltin(
tree.FunctionProperties{Category: categoryMultiRegion},
tree.FunctionProperties{
Category: categoryMultiRegion,
DistsqlBlocklist: true, // applicable only on the gateway
},
tree.Overload{
Types: tree.ArgTypes{},
ReturnType: tree.FixedReturnType(types.String),
Expand Down Expand Up @@ -6349,7 +6355,10 @@ the locality flag on node startup. Returns an error if no region is set.`,
},
),
"crdb_internal.validate_multi_region_zone_configs": makeBuiltin(
tree.FunctionProperties{Category: categoryMultiRegion},
tree.FunctionProperties{
Category: categoryMultiRegion,
DistsqlBlocklist: true, // applicable only on the gateway
},
tree.Overload{
Types: tree.ArgTypes{},
ReturnType: tree.FixedReturnType(types.Bool),
Expand All @@ -6369,7 +6378,10 @@ the locality flag on node startup. Returns an error if no region is set.`,
},
),
"crdb_internal.reset_multi_region_zone_configs_for_table": makeBuiltin(
tree.FunctionProperties{Category: categoryMultiRegion},
tree.FunctionProperties{
Category: categoryMultiRegion,
DistsqlBlocklist: true, // applicable only on the gateway
},
tree.Overload{
Types: tree.ArgTypes{{"id", types.Int}},
ReturnType: tree.FixedReturnType(types.Bool),
Expand All @@ -6391,7 +6403,10 @@ table.`,
},
),
"crdb_internal.reset_multi_region_zone_configs_for_database": makeBuiltin(
tree.FunctionProperties{Category: categoryMultiRegion},
tree.FunctionProperties{
Category: categoryMultiRegion,
DistsqlBlocklist: true, // applicable only on the gateway
},
tree.Overload{
Types: tree.ArgTypes{{"id", types.Int}},
ReturnType: tree.FixedReturnType(types.Bool),
Expand All @@ -6413,7 +6428,10 @@ enabled.`,
},
),
"crdb_internal.filter_multiregion_fields_from_zone_config_sql": makeBuiltin(
tree.FunctionProperties{Category: categoryMultiRegion},
tree.FunctionProperties{
Category: categoryMultiRegion,
DistsqlBlocklist: true, // applicable only on the gateway
},
stringOverload1(
func(evalCtx *tree.EvalContext, s string) (tree.Datum, error) {
stmt, err := parser.ParseOne(s)
Expand Down