From d6f66089f6e935ae1ba2cf7db06f25d080c922d5 Mon Sep 17 00:00:00 2001 From: Sanyam Singhal Date: Mon, 20 Jan 2025 14:08:45 +0000 Subject: [PATCH] Review comments: adding quotes, assigning impact level etc... --- .../tests/analyze-schema/expected_issues.json | 86 +++++++++---------- .../expected_schema_analysis_report.json | 4 +- .../expected_schema_analysis_report.json | 2 +- .../expected_schema_analysis_report.json | 2 +- yb-voyager/cmd/analyzeSchema.go | 1 + yb-voyager/src/query/queryissue/constants.go | 6 +- yb-voyager/src/query/queryissue/issues_ddl.go | 4 +- 7 files changed, 53 insertions(+), 52 deletions(-) diff --git a/migtests/tests/analyze-schema/expected_issues.json b/migtests/tests/analyze-schema/expected_issues.json index a49cf0a635..b0d00247da 100644 --- a/migtests/tests/analyze-schema/expected_issues.json +++ b/migtests/tests/analyze-schema/expected_issues.json @@ -3,7 +3,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "film_fulltext_idx ON public.film", - "Reason": "The schema contains an index with an access method \"GIST\" which is not supported in YugabyteDB.", + "Reason": "The schema contains an index with an access method 'GIST' which is not supported in YugabyteDB.", "SqlStatement": "CREATE INDEX film_fulltext_idx ON public.film USING gist (fulltext);", "DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#gist-brin-and-spgist-index-types-are-not-supported", "Suggestion": "", @@ -167,7 +167,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx1 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like cidr are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'cidr' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx1 on combined_tbl (c);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -178,7 +178,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx2 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like circle are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'circle' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx2 on combined_tbl (ci);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -189,7 +189,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx3 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like box are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'box' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx3 on combined_tbl (b);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -200,7 +200,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx4 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like json are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'json' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx4 on combined_tbl (j);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -211,7 +211,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx5 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like line are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'line' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx5 on combined_tbl (l);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -222,7 +222,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx6 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like lseg are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'lseg' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx6 on combined_tbl (ls);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -233,7 +233,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx7 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like macaddr are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'macaddr' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx7 on combined_tbl (maddr);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -244,7 +244,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx8 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like macaddr8 are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'macaddr8' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx8 on combined_tbl (maddr8);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -255,7 +255,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx9 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like point are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'point' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx9 on combined_tbl (p);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -266,7 +266,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx10 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like pg_lsn are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'pg_lsn' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx10 on combined_tbl (lsn);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -277,7 +277,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx11 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like path are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'path' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx11 on combined_tbl (p1);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -288,7 +288,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx12 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like polygon are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'polygon' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx12 on combined_tbl (p2);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -299,7 +299,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx13 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like txid_snapshot are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'txid_snapshot' are not yet supported in YugabyteDB", "SqlStatement": "CREATE index idx13 on combined_tbl (id1);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -310,7 +310,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx14 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like bit are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'bit' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx14 on combined_tbl (bitt);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -321,7 +321,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx15 ON combined_tbl", - "Reason": "Indexes on columns with complex data types like varbit are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'varbit' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx15 on combined_tbl (bittv);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -398,7 +398,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx_udt ON test_udt", - "Reason": "Indexes on columns with complex data types like user_defined_type are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'user_defined_type' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx_udt on test_udt(home_address);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -409,7 +409,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx_udt1 ON test_udt", - "Reason": "Indexes on columns with complex data types like user_defined_type are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'user_defined_type' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx_udt1 on test_udt(home_address1);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -420,7 +420,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx\u0026_enum2 ON test_udt", - "Reason": "Indexes on columns with complex data types like user_defined_type are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'user_defined_type' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX \"idx\u0026_enum2\" on test_udt((some_field::non_public.enum_test));", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -627,7 +627,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx_name1 ON table_name", - "Reason": "The schema contains an index with an access method \"SPGIST\" which is not supported in YugabyteDB.", + "Reason": "The schema contains an index with an access method 'SPGIST' which is not supported in YugabyteDB.", "SqlStatement": "CREATE INDEX idx_name1 ON table_name USING spgist (col1);", "Suggestion": "", "GH": "https://github.com/YugaByte/yugabyte-db/issues/1337", @@ -837,7 +837,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx1 ON combined_tbl1", - "Reason": "Indexes on columns with complex data types like daterange are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'daterange' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx1 on combined_tbl1 (d);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -848,7 +848,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx2 ON combined_tbl1", - "Reason": "Indexes on columns with complex data types like tsrange are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'tsrange' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx2 on combined_tbl1 (t);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -859,7 +859,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx3 ON combined_tbl1", - "Reason": "Indexes on columns with complex data types like tstzrange are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'tstzrange' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx3 on combined_tbl1 (tz);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -870,7 +870,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx4 ON combined_tbl1", - "Reason": "Indexes on columns with complex data types like numrange are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'numrange' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx4 on combined_tbl1 (n);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -881,7 +881,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx5 ON combined_tbl1", - "Reason": "Indexes on columns with complex data types like int4range are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'int4range' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx5 on combined_tbl1 (i4);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -892,7 +892,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx6 ON combined_tbl1", - "Reason": "Indexes on columns with complex data types like int8range are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'int8range' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx6 on combined_tbl1 (i8);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -903,7 +903,7 @@ "IssueType": "unsupported_features", "ObjectType": "TABLE", "ObjectName": "combined_tbl, constraint: (combined_tbl_j_key)", - "Reason": "Primary key and Unique constraints on columns with complex data types like json are not yet supported in YugabyteDB.", + "Reason": "Primary key and Unique constraints on columns with complex data types like 'json' are not yet supported in YugabyteDB.", "SqlStatement": "create table combined_tbl (\n\tid int,\n\tc cidr,\n\tci circle,\n\tb box,\n\tj json UNIQUE,\n\tl line,\n\tls lseg,\n\tmaddr macaddr,\n\tmaddr8 macaddr8,\n\tp point,\n\tlsn pg_lsn,\n\tp1 path,\n\tp2 polygon,\n\tid1 txid_snapshot,\n\tbitt bit (13),\n\tbittv bit varying(15),\n\tCONSTRAINT pk PRIMARY KEY (id, maddr8)\n);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -914,7 +914,7 @@ "IssueType": "unsupported_features", "ObjectType": "TABLE", "ObjectName": "combined_tbl, constraint: (pk)", - "Reason": "Primary key and Unique constraints on columns with complex data types like macaddr8 are not yet supported in YugabyteDB.", + "Reason": "Primary key and Unique constraints on columns with complex data types like 'macaddr8' are not yet supported in YugabyteDB.", "SqlStatement": "create table combined_tbl (\n\tid int,\n\tc cidr,\n\tci circle,\n\tb box,\n\tj json UNIQUE,\n\tl line,\n\tls lseg,\n\tmaddr macaddr,\n\tmaddr8 macaddr8,\n\tp point,\n\tlsn pg_lsn,\n\tp1 path,\n\tp2 polygon,\n\tid1 txid_snapshot,\n\tbitt bit (13),\n\tbittv bit varying(15),\n\tCONSTRAINT pk PRIMARY KEY (id, maddr8)\n);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -925,7 +925,7 @@ "IssueType": "unsupported_features", "ObjectType": "TABLE", "ObjectName": "combined_tbl, constraint: (combined_tbl_unique)", - "Reason": "Primary key and Unique constraints on columns with complex data types like bit are not yet supported in YugabyteDB.", + "Reason": "Primary key and Unique constraints on columns with complex data types like 'bit' are not yet supported in YugabyteDB.", "SqlStatement": "ALTER TABLE combined_tbl\n\t\tADD CONSTRAINT combined_tbl_unique UNIQUE(id, bitt);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -936,7 +936,7 @@ "IssueType": "unsupported_features", "ObjectType": "TABLE", "ObjectName": "combined_tbl1, constraint: (combined_tbl1_i4_key)", - "Reason": "Primary key and Unique constraints on columns with complex data types like int4range are not yet supported in YugabyteDB.", + "Reason": "Primary key and Unique constraints on columns with complex data types like 'int4range' are not yet supported in YugabyteDB.", "SqlStatement": "CREATE TABLE combined_tbl1(\n\tid int,\n\tt tsrange,\n\td daterange,\n\ttz tstzrange,\n\tn numrange,\n\ti4 int4range UNIQUE,\n\ti8 int8range,\n\tinym INTERVAL YEAR TO MONTH,\n\tinds INTERVAL DAY TO SECOND(9),\n\tPRIMARY KEY(id, t, n)\n);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -947,7 +947,7 @@ "IssueType": "unsupported_features", "ObjectType": "TABLE", "ObjectName": "combined_tbl1, constraint: (combined_tbl1_id_t_n_pkey)", - "Reason": "Primary key and Unique constraints on columns with complex data types like tsrange are not yet supported in YugabyteDB.", + "Reason": "Primary key and Unique constraints on columns with complex data types like 'tsrange' are not yet supported in YugabyteDB.", "SqlStatement": "CREATE TABLE combined_tbl1(\n\tid int,\n\tt tsrange,\n\td daterange,\n\ttz tstzrange,\n\tn numrange,\n\ti4 int4range UNIQUE,\n\ti8 int8range,\n\tinym INTERVAL YEAR TO MONTH,\n\tinds INTERVAL DAY TO SECOND(9),\n\tPRIMARY KEY(id, t, n)\n);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -958,7 +958,7 @@ "IssueType": "unsupported_features", "ObjectType": "TABLE", "ObjectName": "combined_tbl1, constraint: (combined_tbl1_id_t_n_pkey)", - "Reason": "Primary key and Unique constraints on columns with complex data types like numrange are not yet supported in YugabyteDB.", + "Reason": "Primary key and Unique constraints on columns with complex data types like 'numrange' are not yet supported in YugabyteDB.", "SqlStatement": "CREATE TABLE combined_tbl1(\n\tid int,\n\tt tsrange,\n\td daterange,\n\ttz tstzrange,\n\tn numrange,\n\ti4 int4range UNIQUE,\n\ti8 int8range,\n\tinym INTERVAL YEAR TO MONTH,\n\tinds INTERVAL DAY TO SECOND(9),\n\tPRIMARY KEY(id, t, n)\n);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -969,7 +969,7 @@ "IssueType": "unsupported_features", "ObjectType": "TABLE", "ObjectName": "combined_tbl1, constraint: (combined_tbl1_unique)", - "Reason": "Primary key and Unique constraints on columns with complex data types like daterange are not yet supported in YugabyteDB.", + "Reason": "Primary key and Unique constraints on columns with complex data types like 'daterange' are not yet supported in YugabyteDB.", "SqlStatement": "ALTER TABLE combined_tbl1\n\t\tADD CONSTRAINT combined_tbl1_unique UNIQUE(id, d);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -980,7 +980,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx7 ON combined_tbl1", - "Reason": "Indexes on columns with complex data types like interval are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'interval' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx7 on combined_tbl1 (inym);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -991,7 +991,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx8 ON combined_tbl1", - "Reason": "Indexes on columns with complex data types like interval are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'interval' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx8 on combined_tbl1 (inds);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -1002,7 +1002,7 @@ "IssueType": "unsupported_features", "ObjectType": "TABLE", "ObjectName": "test_interval, constraint: (test_interval_frequency_pkey)", - "Reason": "Primary key and Unique constraints on columns with complex data types like interval are not yet supported in YugabyteDB.", + "Reason": "Primary key and Unique constraints on columns with complex data types like 'interval' are not yet supported in YugabyteDB.", "SqlStatement": "create table test_interval(\n frequency interval primary key,\n\tcol1 int\n);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -1097,7 +1097,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "tsvector_idx ON public.documents", - "Reason": "Indexes on columns with complex data types like tsvector are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'tsvector' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX tsvector_idx ON public.documents (title_tsvector, id);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -1108,7 +1108,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "tsquery_idx ON public.ts_query_table", - "Reason": "Indexes on columns with complex data types like tsquery are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'tsquery' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX tsquery_idx ON public.ts_query_table (query);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -1119,7 +1119,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx_citext ON public.citext_type", - "Reason": "Indexes on columns with complex data types like citext are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'citext' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx_citext ON public.citext_type USING btree (data);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -1130,7 +1130,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx_inet ON public.inet_type", - "Reason": "Indexes on columns with complex data types like inet are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'inet' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx_inet ON public.inet_type USING btree (data);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -1141,7 +1141,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx_json ON public.test_jsonb", - "Reason": "Indexes on columns with complex data types like jsonb are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'jsonb' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx_json ON public.test_jsonb (data);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -1152,7 +1152,7 @@ "IssueType": "unsupported_features", "ObjectType":"INDEX", "ObjectName": "idx_json2 ON public.test_jsonb", - "Reason": "Indexes on columns with complex data types like jsonb are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'jsonb' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx_json2 ON public.test_jsonb ((data2::jsonb));", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", @@ -1163,7 +1163,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx_array ON public.documents", - "Reason": "Indexes on columns with complex data types like array are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'array' are not yet supported in YugabyteDB", "SqlStatement": "create index idx_array on public.documents (list_of_sections);", "Suggestion": "Refer to the docs link for the workaround", "GH": "https://github.com/yugabyte/yugabyte-db/issues/25003", diff --git a/migtests/tests/pg/omnibus/expected_files/expected_schema_analysis_report.json b/migtests/tests/pg/omnibus/expected_files/expected_schema_analysis_report.json index ca2e52528d..78e7114993 100755 --- a/migtests/tests/pg/omnibus/expected_files/expected_schema_analysis_report.json +++ b/migtests/tests/pg/omnibus/expected_files/expected_schema_analysis_report.json @@ -216,7 +216,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "hidx ON extension_example.testhstore", - "Reason": "The schema contains an index with an access method \"GIST\" which is not supported in YugabyteDB.", + "Reason": "The schema contains an index with an access method 'GIST' which is not supported in YugabyteDB.", "SqlStatement": "CREATE INDEX hidx ON extension_example.testhstore USING gist (h extension_example.gist_hstore_ops (siglen='32'));", "FilePath": "/home/ubuntu/yb-voyager/migtests/tests/pg/omnibus/export-dir/schema/tables/INDEXES_table.sql", "Suggestion": "", @@ -228,7 +228,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "idx_1 ON composite_type_examples.ordinary_table", - "Reason": "Indexes on columns with complex data types like user_defined_type are not yet supported in YugabyteDB", + "Reason": "Indexes on columns with complex data types like 'user_defined_type' are not yet supported in YugabyteDB", "SqlStatement": "CREATE INDEX idx_1 ON composite_type_examples.ordinary_table USING btree (basic_);", "FilePath": "/home/ubuntu/yb-voyager/migtests/tests/pg/omnibus/export-dir/schema/tables/INDEXES_table.sql", "Suggestion": "Refer to the docs link for the workaround", diff --git a/migtests/tests/pg/osm/expected_files/expected_schema_analysis_report.json b/migtests/tests/pg/osm/expected_files/expected_schema_analysis_report.json index 69be0efc3a..743d0f01db 100755 --- a/migtests/tests/pg/osm/expected_files/expected_schema_analysis_report.json +++ b/migtests/tests/pg/osm/expected_files/expected_schema_analysis_report.json @@ -70,7 +70,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "changeset_geom_gist ON public.osm_changeset", - "Reason": "The schema contains an index with an access method \"GIST\" which is not supported in YugabyteDB.", + "Reason": "The schema contains an index with an access method 'GIST' which is not supported in YugabyteDB.", "SqlStatement": "CREATE INDEX changeset_geom_gist ON public.osm_changeset USING gist (geom);", "FilePath": "/home/ubuntu/yb-voyager/migtests/tests/pg/osm/export-dir/schema/tables/INDEXES_table.sql", "Suggestion": "", diff --git a/migtests/tests/pg/sakila/expected_files/expected_schema_analysis_report.json b/migtests/tests/pg/sakila/expected_files/expected_schema_analysis_report.json index d2ec9fdf9d..1b7719e13b 100755 --- a/migtests/tests/pg/sakila/expected_files/expected_schema_analysis_report.json +++ b/migtests/tests/pg/sakila/expected_files/expected_schema_analysis_report.json @@ -165,7 +165,7 @@ "IssueType": "unsupported_features", "ObjectType": "INDEX", "ObjectName": "film_fulltext_idx ON public.film", - "Reason": "The schema contains an index with an access method \"GIST\" which is not supported in YugabyteDB.", + "Reason": "The schema contains an index with an access method 'GIST' which is not supported in YugabyteDB.", "SqlStatement": "CREATE INDEX film_fulltext_idx ON public.film USING gist (fulltext);", "FilePath": "/home/ubuntu/yb-voyager/migtests/tests/pg/sakila/export-dir/schema/tables/INDEXES_table.sql", "Suggestion": "", diff --git a/yb-voyager/cmd/analyzeSchema.go b/yb-voyager/cmd/analyzeSchema.go index abfeda7ea8..1b52a9611b 100644 --- a/yb-voyager/cmd/analyzeSchema.go +++ b/yb-voyager/cmd/analyzeSchema.go @@ -1255,6 +1255,7 @@ func packAndSendAnalyzeSchemaPayload(status string, errorMsg string) { if strings.HasPrefix(issue.Reason, sensitiveReason) { issue.Reason = sensitiveReason } else { + // TODO: should we just start sending issue type/name here instead of obfuscating the reason since that is anyways static match, err := utils.MatchesFormatString(sensitiveReason, issue.Reason) if match { issue.Reason, err = utils.ObfuscateFormatDetails(sensitiveReason, issue.Reason, constants.OBFUSCATE_STRING) diff --git a/yb-voyager/src/query/queryissue/constants.go b/yb-voyager/src/query/queryissue/constants.go index ec5d14b56f..832258a530 100644 --- a/yb-voyager/src/query/queryissue/constants.go +++ b/yb-voyager/src/query/queryissue/constants.go @@ -122,7 +122,7 @@ const ( // for DDLs STORED_GENERATED_COLUMNS_ISSUE_DESCRIPTION = "Stored generated columns are not supported in YugabyteDB. Detected columns are (%s)." UNLOGGED_TABLES_ISSUE_DESCRIPTION = "UNLOGGED tables are not yet supported in YugabyteDB" - UNSUPPORTED_INDEX_METHOD_DESCRIPTION = "The schema contains an index with an access method %q which is not supported in YugabyteDB." + UNSUPPORTED_INDEX_METHOD_DESCRIPTION = "The schema contains an index with an access method '%s' which is not supported in YugabyteDB." STORAGE_PARAMETERS_ISSUE_DESCRIPTION = "Storage parameters in tables, indexes, and constraints are not yet supported in YugabyteDB" ALTER_TABLE_SET_COLUMN_ATTRIBUTE_ISSUE_DESCRIPTION = "ALTER TABLE .. ALTER COLUMN .. SET ( attribute = value ) is not yet supported in YugabyteDB" ALTER_TABLE_CLUSTER_ON_ISSUE_DESCRIPTION = "ALTER TABLE CLUSTER is not yet supported in YugabyteDB" @@ -145,8 +145,8 @@ const ( UNSUPPORTED_DATATYPE_ISSUE_DESCRIPTION = "Datatype not yet supported in YugabyteDB. Affected column: %s and type: %s." UNSUPPORTED_DATATYPE_LIVE_MIGRATION_ISSUE_DESCRIPTION = "Datatype not yet supported by voyager in live migration. Affected column: %s and type: %s. These columns will be excluded when exporting and importing data in live migration workflows." UNSUPPORTED_DATATYPE_LIVE_MIGRATION_WITH_FF_FB_ISSUE_DESCRIPTION = "Datatype not yet supported by voyager in live migration with fall-forward/fallback. Affected column: %s and type: %s. These columns will be excluded when exporting and importing data in live migration workflows." - PK_UK_ON_COMPLEX_DATATYPE_ISSUE_DESCRIPTION = "Primary key and Unique constraints on columns with complex data types like %s are not yet supported in YugabyteDB." - INDEX_ON_COMPLEX_DATATYPE_ISSUE_DESCRIPTION = "Indexes on columns with complex data types like %s are not yet supported in YugabyteDB" + PK_UK_ON_COMPLEX_DATATYPE_ISSUE_DESCRIPTION = "Primary key and Unique constraints on columns with complex data types like '%s' are not yet supported in YugabyteDB." + INDEX_ON_COMPLEX_DATATYPE_ISSUE_DESCRIPTION = "Indexes on columns with complex data types like '%s' are not yet supported in YugabyteDB" FOREIGN_TABLE_ISSUE_DESCRIPTION = "Foreign table creation fails as SERVER and USER MAPPING objects are not exported by voyager. These should be manually created to make the foreign tables work." INHERITANCE_ISSUE_DESCRIPTION = "Table inheritance is not yet supported in YugabyteDB" REFERENCED_TYPE_DECLARATION_ISSUE_DESCRIPTION = "Referencing the type of a column instead of the actual type name is not supported in YugabyteDB" diff --git a/yb-voyager/src/query/queryissue/issues_ddl.go b/yb-voyager/src/query/queryissue/issues_ddl.go index 6581ebd9d5..b3f49895ee 100644 --- a/yb-voyager/src/query/queryissue/issues_ddl.go +++ b/yb-voyager/src/query/queryissue/issues_ddl.go @@ -351,7 +351,7 @@ func NewXIDDatatypeIssue(objectType string, objectName string, sqlStatement stri var postgisDatatypeIssue = issue.Issue{ Type: POSTGIS_DATATYPE, Name: "Unsupported datatype - POSTGIS", - Impact: constants.IMPACT_LEVEL_1, // Ques: Should it be IMPACT_LEVEL_3 like other unsupported datatypes? + Impact: constants.IMPACT_LEVEL_3, Description: POSTGIS_DATATYPE_ISSUE_DESCRIPTION, GH: "https://github.com/yugabyte/yugabyte-db/issues/11323", DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#unsupported-datatypes-by-yugabytedb", @@ -366,7 +366,7 @@ func NewPostGisDatatypeIssue(objectType string, objectName string, sqlStatement var unsupportedDatatypeIssue = issue.Issue{ Type: UNSUPPORTED_DATATYPE, Name: "Unsupported datatype", - Impact: constants.IMPACT_LEVEL_1, // Ques: Should it be IMPACT_LEVEL_3 like other unsupported datatypes? + Impact: constants.IMPACT_LEVEL_3, Description: UNSUPPORTED_DATATYPE_ISSUE_DESCRIPTION, GH: "https://github.com/yugabyte/yb-voyager/issues/1731", DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#unsupported-datatypes-by-yugabytedb",