From 1c84fb7202f89bb5cbb19d304eb56969003b6a66 Mon Sep 17 00:00:00 2001 From: Matt Spilchen Date: Fri, 22 Nov 2024 08:13:35 -0400 Subject: [PATCH] sql/schemachanger: Remove feature gate for ALTER COLUMN TYPE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previously, altering a column’s type requiring a backfill required the enable_experimental_alter_column_type_general setting to be enabled. This restriction has been removed, as full support for ALTER COLUMN TYPE has been implemented in the Declarative Schema Changer (DSC). The setting is still checked in mixed-version clusters, as the operation relies on 25.1 dependency rules, and when using the legacy schema changer. Epic: CRDB-25314 Informs #49329 Release note (sql change): Altering a column’s type no longer requires enabling the enable_experimental_alter_column_type_general setting. This change makes the feature generally available. --- .../logictestccl/testdata/logic_test/refcursor | 3 +++ .../testdata/logic_test/alter_column_type | 1 + pkg/sql/logictest/testdata/logic_test/drop_type | 3 +++ pkg/sql/logictest/testdata/logic_test/enums | 1 + .../logictest/testdata/logic_test/row_level_ttl | 6 ------ pkg/sql/logictest/testdata/logic_test/show_create | 1 + .../logic_test/truncate_with_concurrent_mutation | 1 + .../testdata/logic_test/udf_schema_change | 1 + pkg/sql/pgwire/testdata/pgtest/row_description | 10 ---------- pkg/sql/schemachanger/dml_injection_test.go | 2 -- .../scbuildstmt/alter_table_alter_column_type.go | 7 ++++--- .../scplan/testdata/alter_table_alter_column_type | 1 - ...ter_table_alter_column_type_general.definition | 1 - .../alter_table_alter_column_type_general.explain | 1 - ..._table_alter_column_type_general.explain_shape | 1 - ...r_table_alter_column_type_general.side_effects | 1 - ...column_type_general__rollback_10_of_15.explain | 1 - ...column_type_general__rollback_11_of_15.explain | 1 - ...column_type_general__rollback_12_of_15.explain | 1 - ...column_type_general__rollback_13_of_15.explain | 1 - ...column_type_general__rollback_14_of_15.explain | 1 - ...column_type_general__rollback_15_of_15.explain | 1 - ..._column_type_general__rollback_1_of_15.explain | 1 - ..._column_type_general__rollback_2_of_15.explain | 1 - ..._column_type_general__rollback_3_of_15.explain | 1 - ..._column_type_general__rollback_4_of_15.explain | 1 - ..._column_type_general__rollback_5_of_15.explain | 1 - ..._column_type_general__rollback_6_of_15.explain | 1 - ..._column_type_general__rollback_7_of_15.explain | 1 - ..._column_type_general__rollback_8_of_15.explain | 1 - ..._column_type_general__rollback_9_of_15.explain | 1 - ...able_alter_column_type_general_expr.definition | 1 - ...r_table_alter_column_type_general_expr.explain | 1 - ...e_alter_column_type_general_expr.explain_shape | 1 - ...le_alter_column_type_general_expr.side_effects | 1 - ...n_type_general_expr__rollback_10_of_15.explain | 1 - ...n_type_general_expr__rollback_11_of_15.explain | 1 - ...n_type_general_expr__rollback_12_of_15.explain | 1 - ...n_type_general_expr__rollback_13_of_15.explain | 1 - ...n_type_general_expr__rollback_14_of_15.explain | 1 - ...n_type_general_expr__rollback_15_of_15.explain | 1 - ...mn_type_general_expr__rollback_1_of_15.explain | 1 - ...mn_type_general_expr__rollback_2_of_15.explain | 1 - ...mn_type_general_expr__rollback_3_of_15.explain | 1 - ...mn_type_general_expr__rollback_4_of_15.explain | 1 - ...mn_type_general_expr__rollback_5_of_15.explain | 1 - ...mn_type_general_expr__rollback_6_of_15.explain | 1 - ...mn_type_general_expr__rollback_7_of_15.explain | 1 - ...mn_type_general_expr__rollback_8_of_15.explain | 1 - ...mn_type_general_expr__rollback_9_of_15.explain | 1 - pkg/workload/schemachange/operation_generator.go | 15 ++++++++------- 51 files changed, 23 insertions(+), 67 deletions(-) diff --git a/pkg/ccl/logictestccl/testdata/logic_test/refcursor b/pkg/ccl/logictestccl/testdata/logic_test/refcursor index 29ae97ca0a1e..915dd8037a82 100644 --- a/pkg/ccl/logictestccl/testdata/logic_test/refcursor +++ b/pkg/ccl/logictestccl/testdata/logic_test/refcursor @@ -38,6 +38,9 @@ SELECT * FROM xy; statement ok DROP TABLE IF EXISTS xy; CREATE TABLE xy (x INT, y TEXT); + +onlyif config local-legacy-schema-changer local-mixed-24.2 local-mixed-24.3 +statement ok SET enable_experimental_alter_column_type_general=true; statement ok diff --git a/pkg/sql/logictest/testdata/logic_test/alter_column_type b/pkg/sql/logictest/testdata/logic_test/alter_column_type index 3cb0887264db..c81599e1f1c4 100644 --- a/pkg/sql/logictest/testdata/logic_test/alter_column_type +++ b/pkg/sql/logictest/testdata/logic_test/alter_column_type @@ -170,6 +170,7 @@ CREATE TABLE t1 (date string) statement ok INSERT INTO t1 VALUES ('2024-07-26') +onlyif config local-mixed-24.2 local-mixed-24.3 statement error pq: ALTER COLUMN TYPE from string to date is only supported experimentally ALTER TABLE t1 ALTER COLUMN date TYPE DATE USING date::DATE diff --git a/pkg/sql/logictest/testdata/logic_test/drop_type b/pkg/sql/logictest/testdata/logic_test/drop_type index 90c144b6b23f..0f0696d5e0fd 100644 --- a/pkg/sql/logictest/testdata/logic_test/drop_type +++ b/pkg/sql/logictest/testdata/logic_test/drop_type @@ -1,5 +1,8 @@ statement ok SET sql_safe_updates = false; + +onlyif config local-legacy-schema-changer local-mixed-24.2 local-mixed-24.3 +statement ok SET enable_experimental_alter_column_type_general = true; # Basic test -- create and drop a type. diff --git a/pkg/sql/logictest/testdata/logic_test/enums b/pkg/sql/logictest/testdata/logic_test/enums index bc0452f60b54..541974cbc7f9 100644 --- a/pkg/sql/logictest/testdata/logic_test/enums +++ b/pkg/sql/logictest/testdata/logic_test/enums @@ -1005,6 +1005,7 @@ statement error pq: foreign key violation: "enum_origin" row x='hello' has no ma ALTER TABLE enum_origin ADD FOREIGN KEY (x) REFERENCES enum_referenced (x) # Tests for ALTER COLUMN SET DATA TYPE. +onlyif config local-legacy-schema-changer local-mixed-24.2 local-mixed-24.3 statement ok SET enable_experimental_alter_column_type_general = true; diff --git a/pkg/sql/logictest/testdata/logic_test/row_level_ttl b/pkg/sql/logictest/testdata/logic_test/row_level_ttl index c174c7ffba4d..8aa91f702a94 100644 --- a/pkg/sql/logictest/testdata/logic_test/row_level_ttl +++ b/pkg/sql/logictest/testdata/logic_test/row_level_ttl @@ -909,15 +909,9 @@ ALTER TABLE tbl_alter_table_ttl_expiration_expression DROP COLUMN expire_at statement ok SET use_declarative_schema_changer = 'on' -statement ok -SET enable_experimental_alter_column_type_general = 'on' - statement error cannot alter type of column "expire_at" referenced by row-level TTL expiration expression "expire_at"\nHINT: use ALTER TABLE .* ALTER TABLE tbl_alter_table_ttl_expiration_expression ALTER expire_at TYPE TIMESTAMP USING (expire_at AT TIME ZONE 'UTC') -statement ok -SET enable_experimental_alter_column_type_general = 'off' - query T SELECT create_statement FROM [SHOW CREATE TABLE tbl_alter_table_ttl_expiration_expression] ---- diff --git a/pkg/sql/logictest/testdata/logic_test/show_create b/pkg/sql/logictest/testdata/logic_test/show_create index 05b2937836f2..55c688dcb7dd 100644 --- a/pkg/sql/logictest/testdata/logic_test/show_create +++ b/pkg/sql/logictest/testdata/logic_test/show_create @@ -129,6 +129,7 @@ c CREATE TABLE public.c ( subtest alter_column_type_not_break_show_create +onlyif config local-legacy-schema-changer local-mixed-24.2 local-mixed-24.3 statement ok SET enable_experimental_alter_column_type_general = true; diff --git a/pkg/sql/logictest/testdata/logic_test/truncate_with_concurrent_mutation b/pkg/sql/logictest/testdata/logic_test/truncate_with_concurrent_mutation index 218070ff522e..12a583d9dd84 100644 --- a/pkg/sql/logictest/testdata/logic_test/truncate_with_concurrent_mutation +++ b/pkg/sql/logictest/testdata/logic_test/truncate_with_concurrent_mutation @@ -87,6 +87,7 @@ CREATE TABLE t5(a int primary key, b int); statement ok SET CLUSTER SETTING jobs.debug.pausepoints = 'schemachanger.before.exec,newschemachanger.before.exec'; +onlyif config local-legacy-schema-changer local-mixed-24.2 local-mixed-24.3 statement ok SET enable_experimental_alter_column_type_general = true; diff --git a/pkg/sql/logictest/testdata/logic_test/udf_schema_change b/pkg/sql/logictest/testdata/logic_test/udf_schema_change index 93eea0087d8f..0df461aaba80 100644 --- a/pkg/sql/logictest/testdata/logic_test/udf_schema_change +++ b/pkg/sql/logictest/testdata/logic_test/udf_schema_change @@ -630,6 +630,7 @@ SELECT f_rtbl(); ---- (1,foobar,2) +onlyif config local-legacy-schema-changer local-mixed-24.2 local-mixed-24.3 statement ok SET enable_experimental_alter_column_type_general=true diff --git a/pkg/sql/pgwire/testdata/pgtest/row_description b/pkg/sql/pgwire/testdata/pgtest/row_description index 294d5bf2a615..5efa7f2f67ad 100644 --- a/pkg/sql/pgwire/testdata/pgtest/row_description +++ b/pkg/sql/pgwire/testdata/pgtest/row_description @@ -317,16 +317,6 @@ ReadyForQuery {"Type":"CommandComplete","CommandTag":"SELECT 1"} {"Type":"ReadyForQuery","TxStatus":"I"} -send crdb_only -Query {"String": "SET enable_experimental_alter_column_type_general = true"} ----- - -until crdb_only -ReadyForQuery ----- -{"Type":"CommandComplete","CommandTag":"SET"} -{"Type":"ReadyForQuery","TxStatus":"I"} - send crdb_only Query {"String": "ALTER TABLE tab3 ALTER COLUMN b TYPE STRING"} ---- diff --git a/pkg/sql/schemachanger/dml_injection_test.go b/pkg/sql/schemachanger/dml_injection_test.go index 7e1122cf3503..4186dc805353 100644 --- a/pkg/sql/schemachanger/dml_injection_test.go +++ b/pkg/sql/schemachanger/dml_injection_test.go @@ -182,7 +182,6 @@ func TestAlterTableDMLInjection(t *testing.T) { { desc: "alter column type general", setup: []string{ - "SET enable_experimental_alter_column_type_general=TRUE", "ALTER TABLE tbl ADD COLUMN new_col BIGINT NOT NULL DEFAULT 100", }, schemaChange: "ALTER TABLE tbl ALTER COLUMN new_col SET DATA TYPE TEXT", @@ -191,7 +190,6 @@ func TestAlterTableDMLInjection(t *testing.T) { { desc: "alter column type general compute", setup: []string{ - "SET enable_experimental_alter_column_type_general=TRUE", "ALTER TABLE tbl ADD COLUMN new_col DATE NOT NULL DEFAULT '2013-05-06', " + "ADD COLUMN new_comp DATE AS (new_col) STORED", }, diff --git a/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/alter_table_alter_column_type.go b/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/alter_table_alter_column_type.go index 4477b3919272..6704d067f8bd 100644 --- a/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/alter_table_alter_column_type.go +++ b/pkg/sql/schemachanger/scbuild/internal/scbuildstmt/alter_table_alter_column_type.go @@ -429,10 +429,11 @@ func updateColumnType(b BuildCtx, oldColType, newColType *scpb.ColumnType) { b.Add(newColType) } -// failIfExperimentalSettingNotSet checks if the setting that allows altering -// types is enabled. If the setting is not enabled, this function will panic. +// failIfExperimentalSettingNotSet checks if the current version requires a +// setting to be enabled to perform an ALTER COLUMN TYPE operation. func failIfExperimentalSettingNotSet(b BuildCtx, oldColType, newColType *scpb.ColumnType) { - if !b.SessionData().AlterColumnTypeGeneralEnabled { + if !b.SessionData().AlterColumnTypeGeneralEnabled && + !b.EvalCtx().Settings.Version.ActiveVersion(b).IsActive(clusterversion.V25_1) { panic(pgerror.WithCandidateCode( errors.WithHint( errors.WithIssueLink( diff --git a/pkg/sql/schemachanger/scplan/testdata/alter_table_alter_column_type b/pkg/sql/schemachanger/scplan/testdata/alter_table_alter_column_type index 676fbab2d3ea..6d659fddddab 100644 --- a/pkg/sql/schemachanger/scplan/testdata/alter_table_alter_column_type +++ b/pkg/sql/schemachanger/scplan/testdata/alter_table_alter_column_type @@ -3,7 +3,6 @@ CREATE TABLE defaultdb.act ( k INT PRIMARY KEY, c1 INT4 ); -SET enable_experimental_alter_column_type_general=TRUE; ---- ops diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.definition b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.definition index fe4067917e16..fddaf6e17aef 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.definition +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.definition @@ -1,6 +1,5 @@ setup CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); ---- diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.explain index 969430220e53..4e971d97e7dd 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.explain_shape b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.explain_shape index 4c46e962c28a..e25dbde3af3e 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.explain_shape +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.explain_shape @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.side_effects b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.side_effects index 4ed536ff8355..95d905ef59df 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.side_effects +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general.side_effects @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); ---- ... diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_10_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_10_of_15.explain index eab9412f5f1b..75d5f38986c1 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_10_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_10_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_11_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_11_of_15.explain index 6007463c3018..28ae9f0a9a2c 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_11_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_11_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_12_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_12_of_15.explain index 625b2c14a20f..11ffedcd48dd 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_12_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_12_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_13_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_13_of_15.explain index ea2648f2e73b..07c2c6486eff 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_13_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_13_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_14_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_14_of_15.explain index 922b053c9e86..f0c57aae43ad 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_14_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_14_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_15_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_15_of_15.explain index efae6fa51a2c..4f7b8389506f 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_15_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_15_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_1_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_1_of_15.explain index 5cf035122ca2..49fd5bee563d 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_1_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_1_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_2_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_2_of_15.explain index 9139cad5fbcb..d3d25f7353b8 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_2_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_2_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_3_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_3_of_15.explain index da9a0c1ed4d9..009889013231 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_3_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_3_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_4_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_4_of_15.explain index 342c02e61e93..2b04b8093737 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_4_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_4_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_5_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_5_of_15.explain index 4121c718163f..52eeeff13b0a 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_5_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_5_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_6_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_6_of_15.explain index 258d655f10ae..bb49db2bb75e 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_6_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_6_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_7_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_7_of_15.explain index 1fb4eedaf11b..64f0578901a8 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_7_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_7_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_8_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_8_of_15.explain index 442c40b04db8..e88fc3c3b147 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_8_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_8_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_9_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_9_of_15.explain index 172c01485e99..e5bfb3fbc562 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_9_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general/alter_table_alter_column_type_general__rollback_9_of_15.explain @@ -1,6 +1,5 @@ /* setup */ CREATE TABLE t (i INT PRIMARY KEY, j TEXT); -SET enable_experimental_alter_column_type_general=TRUE; INSERT INTO t VALUES (1,NULL),(2,'1'),(3,'2'); /* test */ diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.definition b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.definition index a3f173d6a556..ae5fe0c64108 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.definition +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.definition @@ -1,5 +1,4 @@ setup -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); ---- diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.explain index 04214f5a1a16..9e1e1ee3e071 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.explain_shape b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.explain_shape index eca98900b424..1ca2f6713b23 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.explain_shape +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.explain_shape @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.side_effects b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.side_effects index 9f809a48ae20..282bcf2b9744 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.side_effects +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr.side_effects @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); ---- diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_10_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_10_of_15.explain index 8d58731d70f4..20c51db20bbf 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_10_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_10_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_11_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_11_of_15.explain index 2db5e0f44e94..971f5b9fd7fa 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_11_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_11_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_12_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_12_of_15.explain index 18856ce3c4cf..af128f36f6c1 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_12_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_12_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_13_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_13_of_15.explain index 56a2f65ad390..107df564e304 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_13_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_13_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_14_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_14_of_15.explain index 1564d0326f08..a2288e3cb47e 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_14_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_14_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_15_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_15_of_15.explain index b07fa8161aa5..95c448a4edd8 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_15_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_15_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_1_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_1_of_15.explain index 14bd6c3fc938..fc44ea24e5cb 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_1_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_1_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_2_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_2_of_15.explain index a836dd87c477..b0550fc5b14f 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_2_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_2_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_3_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_3_of_15.explain index e5fb36531e0d..76692c149112 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_3_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_3_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_4_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_4_of_15.explain index 6df9b6afb3d4..2f6775a1c039 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_4_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_4_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_5_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_5_of_15.explain index 89aafe44e06a..d3f2cfccf680 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_5_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_5_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_6_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_6_of_15.explain index 2062e9eca50b..0fecbec8bbd5 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_6_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_6_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_7_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_7_of_15.explain index d81d85d11f95..9ddc69312760 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_7_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_7_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_8_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_8_of_15.explain index 7a29e2d9e9ed..23564ec563df 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_8_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_8_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_9_of_15.explain b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_9_of_15.explain index 01c387e50d9f..494cc4a498ce 100644 --- a/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_9_of_15.explain +++ b/pkg/sql/schemachanger/testdata/end_to_end/alter_table_alter_column_type_general_expr/alter_table_alter_column_type_general_expr__rollback_9_of_15.explain @@ -1,5 +1,4 @@ /* setup */ -SET enable_experimental_alter_column_type_general=TRUE; CREATE TABLE t (i INT PRIMARY KEY, j INT DEFAULT 99 ON UPDATE -1); INSERT INTO t VALUES (1,NULL),(2,1),(3,2); diff --git a/pkg/workload/schemachange/operation_generator.go b/pkg/workload/schemachange/operation_generator.go index a9b9bc3c45ea..2c932d4b74d0 100644 --- a/pkg/workload/schemachange/operation_generator.go +++ b/pkg/workload/schemachange/operation_generator.go @@ -2485,15 +2485,13 @@ func (og *operationGenerator) setColumnType(ctx context.Context, tx pgx.Tx) (*op return nil, err } - const setSessionVariableString = `SET enable_experimental_alter_column_type_general = true;` - tableExists, err := og.tableExists(ctx, tx, tableName) if err != nil { return nil, err } if !tableExists { return makeOpStmtForSingleError(OpStmtDDL, - fmt.Sprintf(`%s ALTER TABLE %s ALTER COLUMN IrrelevantColumnName SET DATA TYPE IrrelevantDataType`, setSessionVariableString, tableName), + fmt.Sprintf(`ALTER TABLE %s ALTER COLUMN IrrelevantColumnName SET DATA TYPE IrrelevantDataType`, tableName), pgcode.UndefinedTable), nil } err = og.tableHasPrimaryKeySwapActive(ctx, tx, tableName) @@ -2512,8 +2510,8 @@ func (og *operationGenerator) setColumnType(ctx context.Context, tx pgx.Tx) (*op } if !columnExists { return makeOpStmtForSingleError(OpStmtDDL, - fmt.Sprintf(`%s ALTER TABLE %s ALTER COLUMN "%s" SET DATA TYPE IrrelevantTypeName`, - setSessionVariableString, tableName, columnForTypeChange.name), + fmt.Sprintf(`ALTER TABLE %s ALTER COLUMN "%s" SET DATA TYPE IrrelevantTypeName`, + tableName, columnForTypeChange.name), pgcode.UndefinedColumn), nil } @@ -2559,6 +2557,9 @@ func (og *operationGenerator) setColumnType(ctx context.Context, tx pgx.Tx) (*op // We could fail since we don't specify the USING expression, so it's // possible that we could pick a data type that doesn't have an automatic cast. stmt.potentialExecErrors.add(pgcode.DatatypeMismatch) + // On older versions, attempts to alter the type will fail with an + // experimental feature failure. + stmt.potentialExecErrors.add(pgcode.ExperimentalFeature) } stmt.potentialExecErrors.addAll(codesWithConditions{ @@ -2569,8 +2570,8 @@ func (og *operationGenerator) setColumnType(ctx context.Context, tx pgx.Tx) (*op // TODO(#134008): Remove this with the PR that fixes this bug. stmt.potentialExecErrors.add(pgcode.DependentObjectsStillExist) - stmt.sql = fmt.Sprintf(`%s ALTER TABLE %s ALTER COLUMN %s SET DATA TYPE %s`, - setSessionVariableString, tableName.String(), columnForTypeChange.name.String(), newTypeName.SQLString()) + stmt.sql = fmt.Sprintf(`ALTER TABLE %s ALTER COLUMN %s SET DATA TYPE %s`, + tableName.String(), columnForTypeChange.name.String(), newTypeName.SQLString()) return stmt, nil }