diff --git a/.github/workflows/issue-tests.yml b/.github/workflows/issue-tests.yml
index 550eef3c8a..185818624d 100644
--- a/.github/workflows/issue-tests.yml
+++ b/.github/workflows/issue-tests.yml
@@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
- version: [2.23.1.0-b220, 2024.1.3.1-b8, 2024.2.0.0-b145, 2.20.8.0-b53, 2.18.9.0-b17]
+ version: [2.23.1.0-b220, 2024.1.3.1-b8, 2024.2.0.0-b145, 2.20.8.0-b53, 2.18.9.0-b17, 2.25.0.0-b489]
env:
YB_VERSION: ${{ matrix.version }}
YB_CONN_STR: "postgres://yugabyte:yugabyte@127.0.0.1:5433/yugabyte"
diff --git a/migtests/tests/analyze-schema/expected_issues.json b/migtests/tests/analyze-schema/expected_issues.json
index f634575ea7..b253f82108 100644
--- a/migtests/tests/analyze-schema/expected_issues.json
+++ b/migtests/tests/analyze-schema/expected_issues.json
@@ -24,7 +24,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "public.my_films_view",
- "Reason": "JSON query functions from PostgreSQL 17 are not yet supported in YugabyteDB",
+ "Reason": "JSON query functions from PostgreSQL 17 are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW public.my_films_view AS\nSELECT jt.* FROM\n my_films,\n JSON_TABLE ( js, '$.favorites[*]'\n COLUMNS (\n id FOR ORDINALITY,\n kind text PATH '$.kind',\n NESTED PATH '$.films[*]' COLUMNS (\n title text FORMAT JSON PATH '$.title' OMIT QUOTES,\n director text PATH '$.director' KEEP QUOTES))) AS jt;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
@@ -35,7 +35,7 @@
"IssueType": "unsupported_features",
"ObjectType": "TABLE",
"ObjectName": "public.json_data",
- "Reason": "IS JSON predicate expressions are not yet supported in YugabyteDB",
+ "Reason": "IS JSON predicate expressions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE TABLE public.json_data (\n id SERIAL PRIMARY KEY,\n data_column TEXT NOT NULL CHECK (data_column IS JSON)\n);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
@@ -46,7 +46,7 @@
"IssueType": "unsupported_features",
"ObjectType": "TABLE",
"ObjectName": "test_arr_enum",
- "Reason": "IS JSON predicate expressions are not yet supported in YugabyteDB",
+ "Reason": "IS JSON predicate expressions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE TABLE test_arr_enum (\n\tid int,\n\tarr text[],\n\tarr_enum enum_test[],\n object_column TEXT CHECK (object_column IS JSON OBJECT)\n);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
@@ -57,7 +57,7 @@
"IssueType": "unsupported_features",
"ObjectType": "TABLE",
"ObjectName": "test_udt",
- "Reason": "IS JSON predicate expressions are not yet supported in YugabyteDB",
+ "Reason": "IS JSON predicate expressions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE TABLE test_udt (\n\temployee_id SERIAL PRIMARY KEY,\n\temployee_name VARCHAR(100),\n\thome_address address_type,\n\tsome_field enum_test,\n\thome_address1 non_public.address_type1,\n scalar_column TEXT CHECK (scalar_column IS JSON SCALAR)\n);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
@@ -68,7 +68,7 @@
"IssueType": "unsupported_features",
"ObjectType": "TABLE",
"ObjectName": "public.xml_data_example",
- "Reason": "IS JSON predicate expressions are not yet supported in YugabyteDB",
+ "Reason": "IS JSON predicate expressions are not yet supported in YugabyteDB.",
"SqlStatement": " CREATE TABLE public.xml_data_example (\n id SERIAL PRIMARY KEY,\n name VARCHAR(255),\n description XML DEFAULT xmlparse(document '\u003cproduct\u003e\u003cname\u003eDefault Product\u003c/name\u003e\u003cprice\u003e100.00\u003c/price\u003e\u003ccategory\u003eElectronics\u003c/category\u003e\u003c/product\u003e'),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n unique_keys_column TEXT CHECK (unique_keys_column IS JSON WITH UNIQUE KEYS)\n);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
@@ -79,7 +79,7 @@
"IssueType": "unsupported_features",
"ObjectType": "TABLE",
"ObjectName": "public.locations",
- "Reason": "IS JSON predicate expressions are not yet supported in YugabyteDB",
+ "Reason": "IS JSON predicate expressions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE TABLE public.locations (\n id integer NOT NULL,\n name character varying(100),\n geom geometry(Point,4326),\n array_column TEXT CHECK (array_column IS JSON ARRAY)\n );",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
@@ -90,7 +90,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "test",
- "Reason": "JSON constructor functions from PostgreSQL 17 are not yet supported in YugabyteDB",
+ "Reason": "JSON constructor functions from PostgreSQL 17 are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE OR REPLACE view test AS (\n select x , JSON_ARRAYAGG(trunc(b, 2) order by t desc) as agg\n FROM test1\n where t = '1DAY' group by x\n );",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
@@ -106,13 +106,15 @@
"Suggestion": "No workaround available ",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
"ObjectType": "MVIEW",
"ObjectName": "test",
- "Reason": "JSON constructor functions from PostgreSQL 17 are not yet supported in YugabyteDB",
+ "Reason": "JSON constructor functions from PostgreSQL 17 are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE MATERIALIZED VIEW test AS (\n select x , JSON_ARRAYAGG(trunc(b, 2) order by t desc) as agg\n FROM test1\n where t = '1DAY' group by x\n );",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
@@ -128,7 +130,9 @@
"Suggestion": "This feature is not supported in YugabyteDB yet",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -139,13 +143,15 @@
"Suggestion": "This feature is not supported in YugabyteDB yet",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
"ObjectType": "TABLE",
"ObjectName": "public.xml_data_example",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": " CREATE TABLE public.xml_data_example (\n id SERIAL PRIMARY KEY,\n name VARCHAR(255),\n description XML DEFAULT xmlparse(document '\u003cproduct\u003e\u003cname\u003eDefault Product\u003c/name\u003e\u003cprice\u003e100.00\u003c/price\u003e\u003ccategory\u003eElectronics\u003c/category\u003e\u003c/product\u003e'),\n created_at TIMESTAMPTZ DEFAULT CURRENT_TIMESTAMP,\n unique_keys_column TEXT CHECK (unique_keys_column IS JSON WITH UNIQUE KEYS)\n);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/1043",
@@ -726,7 +732,9 @@
"Suggestion": "Create the triggers on individual partitions.",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/24830",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#before-row-triggers-on-partitioned-tables",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -779,7 +787,9 @@
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#generated-always-as-stored-type-column-is-not-supported",
"Suggestion": "Using Triggers to update the generated columns is one way to work around this issue, refer docs link for more details.",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/10695",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -790,7 +800,9 @@
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#generated-always-as-stored-type-column-is-not-supported",
"Suggestion": "Using Triggers to update the generated columns is one way to work around this issue, refer docs link for more details.",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/10695",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -1636,7 +1648,9 @@
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#generated-always-as-stored-type-column-is-not-supported",
"Suggestion": "Using Triggers to update the generated columns is one way to work around this issue, refer docs link for more details.",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/10695",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "migration_caveats",
@@ -1664,7 +1678,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "FUNCTION",
"ObjectName": "create_and_populate_tables",
- "Reason": "Advisory locks are not yet implemented in YugabyteDB",
+ "Reason": "Advisory locks are not yet implemented in YugabyteDB.",
"SqlStatement": "SELECT pg_advisory_lock(sender_id);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/3642",
@@ -1675,7 +1689,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "FUNCTION",
"ObjectName": "create_and_populate_tables",
- "Reason": "Advisory locks are not yet implemented in YugabyteDB",
+ "Reason": "Advisory locks are not yet implemented in YugabyteDB.",
"SqlStatement": "SELECT pg_advisory_lock(receiver_id);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/3642",
@@ -1686,7 +1700,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "FUNCTION",
"ObjectName": "create_and_populate_tables",
- "Reason": "Advisory locks are not yet implemented in YugabyteDB",
+ "Reason": "Advisory locks are not yet implemented in YugabyteDB.",
"SqlStatement": "SELECT pg_advisory_unlock(sender_id);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/3642",
@@ -1697,7 +1711,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "FUNCTION",
"ObjectName": "create_and_populate_tables",
- "Reason": "Advisory locks are not yet implemented in YugabyteDB",
+ "Reason": "Advisory locks are not yet implemented in YugabyteDB.",
"SqlStatement": "SELECT pg_advisory_unlock(receiver_id);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/3642",
@@ -1708,7 +1722,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "FUNCTION",
"ObjectName": "create_and_populate_tables",
- "Reason": "Advisory locks are not yet implemented in YugabyteDB",
+ "Reason": "Advisory locks are not yet implemented in YugabyteDB.",
"SqlStatement": "SELECT pg_advisory_unlock(sender_id);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/3642",
@@ -1719,7 +1733,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "FUNCTION",
"ObjectName": "create_and_populate_tables",
- "Reason": "Advisory locks are not yet implemented in YugabyteDB",
+ "Reason": "Advisory locks are not yet implemented in YugabyteDB.",
"SqlStatement": "SELECT pg_advisory_unlock(receiver_id);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/3642",
@@ -1730,7 +1744,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "FUNCTION",
"ObjectName": "create_and_populate_tables",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "SELECT id, xpath('/person/name/text()', data) AS name FROM test_xml_type;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/1043",
@@ -1741,7 +1755,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "FUNCTION",
"ObjectName": "create_and_populate_tables",
- "Reason": "System columns are not yet supported in YugabyteDB",
+ "Reason": "System columns are not yet supported in YugabyteDB.",
"SqlStatement": "SELECT * FROM employees e WHERE e.xmax = (SELECT MAX(xmax) FROM employees WHERE department = e.department);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/24843",
@@ -1752,7 +1766,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "PROCEDURE",
"ObjectName": "add_employee",
- "Reason": "Advisory locks are not yet implemented in YugabyteDB",
+ "Reason": "Advisory locks are not yet implemented in YugabyteDB.",
"SqlStatement": "SELECT id, first_name FROM employees WHERE pg_try_advisory_lock(300) IS TRUE;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/3642",
@@ -1763,7 +1777,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "PROCEDURE",
"ObjectName": "add_employee",
- "Reason": "System columns are not yet supported in YugabyteDB",
+ "Reason": "System columns are not yet supported in YugabyteDB.",
"SqlStatement": "SELECT e.id, e.name,\n ROW_NUMBER() OVER (ORDER BY e.ctid) AS row_num\n FROM employees e;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/24843",
@@ -1774,7 +1788,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "PROCEDURE",
"ObjectName": "add_employee",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "SELECT e.id, x.employee_xml\n FROM employees e\n JOIN (\n SELECT xmlelement(name \"employee\", xmlattributes(e.id AS \"id\"), e.name) AS employee_xml\n FROM employees e\n ) x ON x.employee_xml IS NOT NULL\n WHERE xmlexists('//employee[name=\"John Doe\"]' PASSING BY REF x.employee_xml);",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/1043",
@@ -1785,7 +1799,7 @@
"IssueType": "unsupported_plpgsql_objects",
"ObjectType": "PROCEDURE",
"ObjectName": "add_employee",
- "Reason": "Advisory locks are not yet implemented in YugabyteDB",
+ "Reason": "Advisory locks are not yet implemented in YugabyteDB.",
"SqlStatement": "SELECT e.id,\n CASE\n WHEN e.salary \u003e 100000 THEN pg_advisory_lock(e.id)\n ELSE pg_advisory_unlock(e.id)\n END AS lock_status\n FROM employees e;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/3642",
@@ -1796,7 +1810,7 @@
"IssueType": "unsupported_features",
"ObjectType": "MVIEW",
"ObjectName": "public.sample_data_view",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE MATERIALIZED VIEW public.sample_data_view AS\n SELECT sample_data.id,\n sample_data.name,\n sample_data.description,\n XMLFOREST(sample_data.name AS name, sample_data.description AS description) AS xml_data,\n pg_try_advisory_lock((sample_data.id)::bigint) AS lock_acquired,\n sample_data.ctid AS row_ctid,\n sample_data.xmin AS xmin_value\n FROM public.sample_data\n WITH NO DATA;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/1043",
@@ -1807,7 +1821,7 @@
"IssueType": "unsupported_features",
"ObjectType": "MVIEW",
"ObjectName": "public.sample_data_view",
- "Reason": "Advisory locks are not yet implemented in YugabyteDB",
+ "Reason": "Advisory locks are not yet implemented in YugabyteDB.",
"SqlStatement": "CREATE MATERIALIZED VIEW public.sample_data_view AS\n SELECT sample_data.id,\n sample_data.name,\n sample_data.description,\n XMLFOREST(sample_data.name AS name, sample_data.description AS description) AS xml_data,\n pg_try_advisory_lock((sample_data.id)::bigint) AS lock_acquired,\n sample_data.ctid AS row_ctid,\n sample_data.xmin AS xmin_value\n FROM public.sample_data\n WITH NO DATA;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/3642",
@@ -1818,7 +1832,7 @@
"IssueType": "unsupported_features",
"ObjectType": "MVIEW",
"ObjectName": "public.sample_data_view",
- "Reason": "System columns are not yet supported in YugabyteDB",
+ "Reason": "System columns are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE MATERIALIZED VIEW public.sample_data_view AS\n SELECT sample_data.id,\n sample_data.name,\n sample_data.description,\n XMLFOREST(sample_data.name AS name, sample_data.description AS description) AS xml_data,\n pg_try_advisory_lock((sample_data.id)::bigint) AS lock_acquired,\n sample_data.ctid AS row_ctid,\n sample_data.xmin AS xmin_value\n FROM public.sample_data\n WITH NO DATA;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/24843",
@@ -1829,7 +1843,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "public.orders_view",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW public.orders_view AS\n SELECT orders.order_id,\n orders.customer_name,\n orders.product_name,\n orders.quantity,\n orders.price,\n XMLELEMENT(NAME \"OrderDetails\", XMLELEMENT(NAME \"Customer\", orders.customer_name), XMLELEMENT(NAME \"Product\", orders.product_name), XMLELEMENT(NAME \"Quantity\", orders.quantity), XMLELEMENT(NAME \"TotalPrice\", (orders.price * (orders.quantity)::numeric))) AS order_xml,\n XMLCONCAT(XMLELEMENT(NAME \"Customer\", orders.customer_name), XMLELEMENT(NAME \"Product\", orders.product_name)) AS summary_xml,\n pg_try_advisory_lock((hashtext((orders.customer_name || orders.product_name)))::bigint) AS lock_acquired,\n orders.ctid AS row_ctid,\n orders.xmin AS transaction_id\n FROM public.orders;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/1043",
@@ -1840,7 +1854,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "public.orders_view",
- "Reason": "Advisory locks are not yet implemented in YugabyteDB",
+ "Reason": "Advisory locks are not yet implemented in YugabyteDB.",
"SqlStatement": "CREATE VIEW public.orders_view AS\n SELECT orders.order_id,\n orders.customer_name,\n orders.product_name,\n orders.quantity,\n orders.price,\n XMLELEMENT(NAME \"OrderDetails\", XMLELEMENT(NAME \"Customer\", orders.customer_name), XMLELEMENT(NAME \"Product\", orders.product_name), XMLELEMENT(NAME \"Quantity\", orders.quantity), XMLELEMENT(NAME \"TotalPrice\", (orders.price * (orders.quantity)::numeric))) AS order_xml,\n XMLCONCAT(XMLELEMENT(NAME \"Customer\", orders.customer_name), XMLELEMENT(NAME \"Product\", orders.product_name)) AS summary_xml,\n pg_try_advisory_lock((hashtext((orders.customer_name || orders.product_name)))::bigint) AS lock_acquired,\n orders.ctid AS row_ctid,\n orders.xmin AS transaction_id\n FROM public.orders;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/3642",
@@ -1851,7 +1865,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "public.orders_view",
- "Reason": "System columns are not yet supported in YugabyteDB",
+ "Reason": "System columns are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW public.orders_view AS\n SELECT orders.order_id,\n orders.customer_name,\n orders.product_name,\n orders.quantity,\n orders.price,\n XMLELEMENT(NAME \"OrderDetails\", XMLELEMENT(NAME \"Customer\", orders.customer_name), XMLELEMENT(NAME \"Product\", orders.product_name), XMLELEMENT(NAME \"Quantity\", orders.quantity), XMLELEMENT(NAME \"TotalPrice\", (orders.price * (orders.quantity)::numeric))) AS order_xml,\n XMLCONCAT(XMLELEMENT(NAME \"Customer\", orders.customer_name), XMLELEMENT(NAME \"Product\", orders.product_name)) AS summary_xml,\n pg_try_advisory_lock((hashtext((orders.customer_name || orders.product_name)))::bigint) AS lock_acquired,\n orders.ctid AS row_ctid,\n orders.xmin AS transaction_id\n FROM public.orders;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/24843",
@@ -2027,7 +2041,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "top_employees_view",
- "Reason": "FETCH .. WITH TIES is not yet supported in YugabyteDB",
+ "Reason": "FETCH .. WITH TIES is not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW top_employees_view AS SELECT * FROM (\n\t\t\tSELECT * FROM employees\n\t\t\tORDER BY salary DESC\n\t\t\tFETCH FIRST 2 ROWS WITH TIES\n\t\t) AS top_employees;",
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
@@ -2043,7 +2057,9 @@
"Suggestion": "Multirange data type is not yet supported in YugabyteDB, no workaround available currently",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_datatypes",
@@ -2054,7 +2070,9 @@
"Suggestion": "Multirange data type is not yet supported in YugabyteDB, no workaround available currently",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_datatypes",
@@ -2065,7 +2083,9 @@
"Suggestion": "Multirange data type is not yet supported in YugabyteDB, no workaround available currently",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -2076,7 +2096,9 @@
"Suggestion": "No workaround available",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -2087,7 +2109,9 @@
"Suggestion": "No workaround available",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -2098,7 +2122,9 @@
"Suggestion": "No workaround available",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_datatypes",
@@ -2109,7 +2135,9 @@
"Suggestion": "Multirange data type is not yet supported in YugabyteDB, no workaround available currently",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_datatypes",
@@ -2120,7 +2148,9 @@
"Suggestion": "Multirange data type is not yet supported in YugabyteDB, no workaround available currently",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_datatypes",
@@ -2131,7 +2161,9 @@
"Suggestion": "Multirange data type is not yet supported in YugabyteDB, no workaround available currently",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -2142,7 +2174,9 @@
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -2153,7 +2187,9 @@
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -2164,7 +2200,9 @@
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -2175,7 +2213,9 @@
"Suggestion": "",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/25575",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "migration_caveats",
diff --git a/migtests/tests/pg/adventureworks/expected_files/expected_schema_analysis_report.json b/migtests/tests/pg/adventureworks/expected_files/expected_schema_analysis_report.json
index c64c3cc5c0..c78e2e97c9 100755
--- a/migtests/tests/pg/adventureworks/expected_files/expected_schema_analysis_report.json
+++ b/migtests/tests/pg/adventureworks/expected_files/expected_schema_analysis_report.json
@@ -973,7 +973,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "humanresources.vjobcandidate",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW humanresources.vjobcandidate AS\n SELECT jobcandidateid,\n businessentityid,\n ((xpath('/n:Resume/n:Name/n:Name.Prefix/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying(30) AS \"Name.Prefix\",\n ((xpath('/n:Resume/n:Name/n:Name.First/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying(30) AS \"Name.First\",\n ((xpath('/n:Resume/n:Name/n:Name.Middle/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying(30) AS \"Name.Middle\",\n ((xpath('/n:Resume/n:Name/n:Name.Last/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying(30) AS \"Name.Last\",\n ((xpath('/n:Resume/n:Name/n:Name.Suffix/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying(30) AS \"Name.Suffix\",\n ((xpath('/n:Resume/n:Skills/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying AS \"Skills\",\n ((xpath('n:Address/n:Addr.Type/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying(30) AS \"Addr.Type\",\n ((xpath('n:Address/n:Addr.Location/n:Location/n:Loc.CountryRegion/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying(100) AS \"Addr.Loc.CountryRegion\",\n ((xpath('n:Address/n:Addr.Location/n:Location/n:Loc.State/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying(100) AS \"Addr.Loc.State\",\n ((xpath('n:Address/n:Addr.Location/n:Location/n:Loc.City/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying(100) AS \"Addr.Loc.City\",\n ((xpath('n:Address/n:Addr.PostalCode/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying(20) AS \"Addr.PostalCode\",\n ((xpath('/n:Resume/n:EMail/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying AS \"EMail\",\n ((xpath('/n:Resume/n:WebSite/text()'::text, resume, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[]))[1])::character varying AS \"WebSite\",\n modifieddate\n FROM humanresources.jobcandidate;",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/adventureworks/export-dir/schema/views/view.sql",
"Suggestion": "",
@@ -985,7 +985,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "humanresources.vjobcandidateeducation",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW humanresources.vjobcandidateeducation AS\n SELECT jobcandidateid,\n ((xpath('/root/ns:Education/ns:Edu.Level/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(50) AS \"Edu.Level\",\n (((xpath('/root/ns:Education/ns:Edu.StartDate/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(20))::date AS \"Edu.StartDate\",\n (((xpath('/root/ns:Education/ns:Edu.EndDate/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(20))::date AS \"Edu.EndDate\",\n ((xpath('/root/ns:Education/ns:Edu.Degree/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(50) AS \"Edu.Degree\",\n ((xpath('/root/ns:Education/ns:Edu.Major/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(50) AS \"Edu.Major\",\n ((xpath('/root/ns:Education/ns:Edu.Minor/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(50) AS \"Edu.Minor\",\n ((xpath('/root/ns:Education/ns:Edu.GPA/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(5) AS \"Edu.GPA\",\n ((xpath('/root/ns:Education/ns:Edu.GPAScale/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(5) AS \"Edu.GPAScale\",\n ((xpath('/root/ns:Education/ns:Edu.School/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(100) AS \"Edu.School\",\n ((xpath('/root/ns:Education/ns:Edu.Location/ns:Location/ns:Loc.CountryRegion/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(100) AS \"Edu.Loc.CountryRegion\",\n ((xpath('/root/ns:Education/ns:Edu.Location/ns:Location/ns:Loc.State/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(100) AS \"Edu.Loc.State\",\n ((xpath('/root/ns:Education/ns:Edu.Location/ns:Location/ns:Loc.City/text()'::text, doc, '{{ns,http://adventureworks.com}}'::text[]))[1])::character varying(100) AS \"Edu.Loc.City\"\n FROM ( SELECT unnesting.jobcandidateid,\n ((('\u003croot xmlns:ns=\"http://adventureworks.com\"\u003e'::text || ((unnesting.education)::character varying)::text) || '\u003c/root\u003e'::text))::xml AS doc\n FROM ( SELECT jobcandidate.jobcandidateid,\n unnest(xpath('/ns:Resume/ns:Education'::text, jobcandidate.resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])) AS education\n FROM humanresources.jobcandidate) unnesting) jc;",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/adventureworks/export-dir/schema/views/view.sql",
"Suggestion": "",
@@ -997,7 +997,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "humanresources.vjobcandidateemployment",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW humanresources.vjobcandidateemployment AS\n SELECT jobcandidateid,\n ((unnest(xpath('/ns:Resume/ns:Employment/ns:Emp.StartDate/text()'::text, resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])))::character varying(20))::date AS \"Emp.StartDate\",\n ((unnest(xpath('/ns:Resume/ns:Employment/ns:Emp.EndDate/text()'::text, resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])))::character varying(20))::date AS \"Emp.EndDate\",\n (unnest(xpath('/ns:Resume/ns:Employment/ns:Emp.OrgName/text()'::text, resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])))::character varying(100) AS \"Emp.OrgName\",\n (unnest(xpath('/ns:Resume/ns:Employment/ns:Emp.JobTitle/text()'::text, resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])))::character varying(100) AS \"Emp.JobTitle\",\n (unnest(xpath('/ns:Resume/ns:Employment/ns:Emp.Responsibility/text()'::text, resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])))::character varying AS \"Emp.Responsibility\",\n (unnest(xpath('/ns:Resume/ns:Employment/ns:Emp.FunctionCategory/text()'::text, resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])))::character varying AS \"Emp.FunctionCategory\",\n (unnest(xpath('/ns:Resume/ns:Employment/ns:Emp.IndustryCategory/text()'::text, resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])))::character varying AS \"Emp.IndustryCategory\",\n (unnest(xpath('/ns:Resume/ns:Employment/ns:Emp.Location/ns:Location/ns:Loc.CountryRegion/text()'::text, resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])))::character varying AS \"Emp.Loc.CountryRegion\",\n (unnest(xpath('/ns:Resume/ns:Employment/ns:Emp.Location/ns:Location/ns:Loc.State/text()'::text, resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])))::character varying AS \"Emp.Loc.State\",\n (unnest(xpath('/ns:Resume/ns:Employment/ns:Emp.Location/ns:Location/ns:Loc.City/text()'::text, resume, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/Resume}}'::text[])))::character varying AS \"Emp.Loc.City\"\n FROM humanresources.jobcandidate;",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/adventureworks/export-dir/schema/views/view.sql",
"Suggestion": "",
@@ -1009,7 +1009,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "person.vadditionalcontactinfo",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW person.vadditionalcontactinfo AS\n SELECT p.businessentityid,\n p.firstname,\n p.middlename,\n p.lastname,\n (xpath('(act:telephoneNumber)[1]/act:number/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1] AS telephonenumber,\n btrim((((xpath('(act:telephoneNumber)[1]/act:SpecialInstructions/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1])::character varying)::text) AS telephonespecialinstructions,\n (xpath('(act:homePostalAddress)[1]/act:Street/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1] AS street,\n (xpath('(act:homePostalAddress)[1]/act:City/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1] AS city,\n (xpath('(act:homePostalAddress)[1]/act:StateProvince/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1] AS stateprovince,\n (xpath('(act:homePostalAddress)[1]/act:PostalCode/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1] AS postalcode,\n (xpath('(act:homePostalAddress)[1]/act:CountryRegion/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1] AS countryregion,\n (xpath('(act:homePostalAddress)[1]/act:SpecialInstructions/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1] AS homeaddressspecialinstructions,\n (xpath('(act:eMail)[1]/act:eMailAddress/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1] AS emailaddress,\n btrim((((xpath('(act:eMail)[1]/act:SpecialInstructions/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1])::character varying)::text) AS emailspecialinstructions,\n (xpath('((act:eMail)[1]/act:SpecialInstructions/act:telephoneNumber)[1]/act:number/text()'::text, additional.node, '{{act,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactTypes}}'::text[]))[1] AS emailtelephonenumber,\n p.rowguid,\n p.modifieddate\n FROM (person.person p\n LEFT JOIN ( SELECT person.businessentityid,\n unnest(xpath('/ci:AdditionalContactInfo'::text, person.additionalcontactinfo, '{{ci,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ContactInfo}}'::text[])) AS node\n FROM person.person\n WHERE (person.additionalcontactinfo IS NOT NULL)) additional ON ((p.businessentityid = additional.businessentityid)));",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/adventureworks/export-dir/schema/views/view.sql",
"Suggestion": "",
@@ -1021,7 +1021,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "production.vproductmodelcatalogdescription",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW production.vproductmodelcatalogdescription AS\n SELECT productmodelid,\n name,\n ((xpath('/p1:ProductDescription/p1:Summary/html:p/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription},{html,http://www.w3.org/1999/xhtml}}'::text[]))[1])::character varying AS \"Summary\",\n ((xpath('/p1:ProductDescription/p1:Manufacturer/p1:Name/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying AS manufacturer,\n ((xpath('/p1:ProductDescription/p1:Manufacturer/p1:Copyright/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying(30) AS copyright,\n ((xpath('/p1:ProductDescription/p1:Manufacturer/p1:ProductURL/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying(256) AS producturl,\n ((xpath('/p1:ProductDescription/p1:Features/wm:Warranty/wm:WarrantyPeriod/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription},{wm,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain}}'::text[]))[1])::character varying(256) AS warrantyperiod,\n ((xpath('/p1:ProductDescription/p1:Features/wm:Warranty/wm:Description/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription},{wm,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain}}'::text[]))[1])::character varying(256) AS warrantydescription,\n ((xpath('/p1:ProductDescription/p1:Features/wm:Maintenance/wm:NoOfYears/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription},{wm,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain}}'::text[]))[1])::character varying(256) AS noofyears,\n ((xpath('/p1:ProductDescription/p1:Features/wm:Maintenance/wm:Description/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription},{wm,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelWarrAndMain}}'::text[]))[1])::character varying(256) AS maintenancedescription,\n ((xpath('/p1:ProductDescription/p1:Features/wf:wheel/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription},{wf,http://www.adventure-works.com/schemas/OtherFeatures}}'::text[]))[1])::character varying(256) AS wheel,\n ((xpath('/p1:ProductDescription/p1:Features/wf:saddle/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription},{wf,http://www.adventure-works.com/schemas/OtherFeatures}}'::text[]))[1])::character varying(256) AS saddle,\n ((xpath('/p1:ProductDescription/p1:Features/wf:pedal/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription},{wf,http://www.adventure-works.com/schemas/OtherFeatures}}'::text[]))[1])::character varying(256) AS pedal,\n ((xpath('/p1:ProductDescription/p1:Features/wf:BikeFrame/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription},{wf,http://www.adventure-works.com/schemas/OtherFeatures}}'::text[]))[1])::character varying AS bikeframe,\n ((xpath('/p1:ProductDescription/p1:Features/wf:crankset/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription},{wf,http://www.adventure-works.com/schemas/OtherFeatures}}'::text[]))[1])::character varying(256) AS crankset,\n ((xpath('/p1:ProductDescription/p1:Picture/p1:Angle/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying(256) AS pictureangle,\n ((xpath('/p1:ProductDescription/p1:Picture/p1:Size/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying(256) AS picturesize,\n ((xpath('/p1:ProductDescription/p1:Picture/p1:ProductPhotoID/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying(256) AS productphotoid,\n ((xpath('/p1:ProductDescription/p1:Specifications/Material/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying(256) AS material,\n ((xpath('/p1:ProductDescription/p1:Specifications/Color/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying(256) AS color,\n ((xpath('/p1:ProductDescription/p1:Specifications/ProductLine/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying(256) AS productline,\n ((xpath('/p1:ProductDescription/p1:Specifications/Style/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying(256) AS style,\n ((xpath('/p1:ProductDescription/p1:Specifications/RiderExperience/text()'::text, catalogdescription, '{{p1,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelDescription}}'::text[]))[1])::character varying(1024) AS riderexperience,\n rowguid,\n modifieddate\n FROM production.productmodel\n WHERE (catalogdescription IS NOT NULL);",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/adventureworks/export-dir/schema/views/view.sql",
"Suggestion": "",
@@ -1033,7 +1033,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "production.vproductmodelinstructions",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW production.vproductmodelinstructions AS\n SELECT productmodelid,\n name,\n ((xpath('/ns:root/text()'::text, instructions, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions}}'::text[]))[1])::character varying AS instructions,\n (((xpath('@LocationID'::text, mfginstructions))[1])::character varying)::integer AS \"LocationID\",\n (((xpath('@SetupHours'::text, mfginstructions))[1])::character varying)::numeric(9,4) AS \"SetupHours\",\n (((xpath('@MachineHours'::text, mfginstructions))[1])::character varying)::numeric(9,4) AS \"MachineHours\",\n (((xpath('@LaborHours'::text, mfginstructions))[1])::character varying)::numeric(9,4) AS \"LaborHours\",\n (((xpath('@LotSize'::text, mfginstructions))[1])::character varying)::integer AS \"LotSize\",\n ((xpath('/step/text()'::text, step))[1])::character varying(1024) AS \"Step\",\n rowguid,\n modifieddate\n FROM ( SELECT locations.productmodelid,\n locations.name,\n locations.rowguid,\n locations.modifieddate,\n locations.instructions,\n locations.mfginstructions,\n unnest(xpath('step'::text, locations.mfginstructions)) AS step\n FROM ( SELECT productmodel.productmodelid,\n productmodel.name,\n productmodel.rowguid,\n productmodel.modifieddate,\n productmodel.instructions,\n unnest(xpath('/ns:root/ns:Location'::text, productmodel.instructions, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/ProductModelManuInstructions}}'::text[])) AS mfginstructions\n FROM production.productmodel) locations) pm;",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/adventureworks/export-dir/schema/views/view.sql",
"Suggestion": "",
@@ -1045,7 +1045,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "sales.vpersondemographics",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW sales.vpersondemographics AS\n SELECT businessentityid,\n (((xpath('n:TotalPurchaseYTD/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying)::money AS totalpurchaseytd,\n (((xpath('n:DateFirstPurchase/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying)::date AS datefirstpurchase,\n (((xpath('n:BirthDate/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying)::date AS birthdate,\n ((xpath('n:MaritalStatus/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying(1) AS maritalstatus,\n ((xpath('n:YearlyIncome/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying(30) AS yearlyincome,\n ((xpath('n:Gender/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying(1) AS gender,\n (((xpath('n:TotalChildren/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying)::integer AS totalchildren,\n (((xpath('n:NumberChildrenAtHome/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying)::integer AS numberchildrenathome,\n ((xpath('n:Education/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying(30) AS education,\n ((xpath('n:Occupation/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying(30) AS occupation,\n (((xpath('n:HomeOwnerFlag/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying)::boolean AS homeownerflag,\n (((xpath('n:NumberCarsOwned/text()'::text, demographics, '{{n,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/IndividualSurvey}}'::text[]))[1])::character varying)::integer AS numbercarsowned\n FROM person.person\n WHERE (demographics IS NOT NULL);",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/adventureworks/export-dir/schema/views/view.sql",
"Suggestion": "",
@@ -1057,7 +1057,7 @@
"IssueType": "unsupported_features",
"ObjectType": "VIEW",
"ObjectName": "sales.vstorewithdemographics",
- "Reason": "XML functions are not yet supported in YugabyteDB",
+ "Reason": "XML functions are not yet supported in YugabyteDB.",
"SqlStatement": "CREATE VIEW sales.vstorewithdemographics AS\n SELECT businessentityid,\n name,\n ((unnest(xpath('/ns:StoreSurvey/ns:AnnualSales/text()'::text, demographics, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey}}'::text[])))::character varying)::money AS \"AnnualSales\",\n ((unnest(xpath('/ns:StoreSurvey/ns:AnnualRevenue/text()'::text, demographics, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey}}'::text[])))::character varying)::money AS \"AnnualRevenue\",\n (unnest(xpath('/ns:StoreSurvey/ns:BankName/text()'::text, demographics, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey}}'::text[])))::character varying(50) AS \"BankName\",\n (unnest(xpath('/ns:StoreSurvey/ns:BusinessType/text()'::text, demographics, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey}}'::text[])))::character varying(5) AS \"BusinessType\",\n ((unnest(xpath('/ns:StoreSurvey/ns:YearOpened/text()'::text, demographics, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey}}'::text[])))::character varying)::integer AS \"YearOpened\",\n (unnest(xpath('/ns:StoreSurvey/ns:Specialty/text()'::text, demographics, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey}}'::text[])))::character varying(50) AS \"Specialty\",\n ((unnest(xpath('/ns:StoreSurvey/ns:SquareFeet/text()'::text, demographics, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey}}'::text[])))::character varying)::integer AS \"SquareFeet\",\n (unnest(xpath('/ns:StoreSurvey/ns:Brands/text()'::text, demographics, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey}}'::text[])))::character varying(30) AS \"Brands\",\n (unnest(xpath('/ns:StoreSurvey/ns:Internet/text()'::text, demographics, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey}}'::text[])))::character varying(30) AS \"Internet\",\n ((unnest(xpath('/ns:StoreSurvey/ns:NumberEmployees/text()'::text, demographics, '{{ns,http://schemas.microsoft.com/sqlserver/2004/07/adventure-works/StoreSurvey}}'::text[])))::character varying)::integer AS \"NumberEmployees\"\n FROM sales.store;",
"FilePath": "/Users/priyanshigupta/Documents/voyager/yb-voyager/migtests/tests/pg/adventureworks/export-dir/schema/views/view.sql",
"Suggestion": "",
diff --git a/migtests/tests/pg/assessment-report-test-uqc/expectedAssessmentReport.json b/migtests/tests/pg/assessment-report-test-uqc/expectedAssessmentReport.json
index 4a3e4d6e36..bcd4e08f56 100644
--- a/migtests/tests/pg/assessment-report-test-uqc/expectedAssessmentReport.json
+++ b/migtests/tests/pg/assessment-report-test-uqc/expectedAssessmentReport.json
@@ -86,7 +86,7 @@
"UnsupportedDataTypesDesc": "Data types of the source database that are not supported on the target YugabyteDB.",
"UnsupportedFeatures": [
{
- "FeatureName": "Aggregate Functions",
+ "FeatureName": "Range aggregate Functions",
"Objects": [
{
"ObjectName": "sales.event_analysis_view",
@@ -95,7 +95,16 @@
{
"ObjectName": "sales.event_analysis_view2",
"SqlStatement": "CREATE VIEW sales.event_analysis_view2 AS\n SELECT range_intersect_agg(event_range) AS overlapping_range\n FROM sales.events;"
- },
+ }
+ ],
+ "DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
+ },
+ {
+ "FeatureName": "ANY_VALUE() aggregate Function",
+ "Objects": [
{
"ObjectName": "sales.employ_depart_view",
"SqlStatement": "CREATE VIEW sales.employ_depart_view AS\n SELECT any_value(name) AS any_employee\n FROM public.employees;"
@@ -113,7 +122,9 @@
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"FeatureName": "Json Type Predicate",
@@ -252,19 +263,23 @@
"MinimumVersionsFixedIn": null
},
{
- "ConstructTypeName": "Aggregate Functions",
+ "ConstructTypeName": "Range aggregate Functions",
"Query": "SELECT range_intersect_agg(event_range) AS intersection_of_ranges\nFROM sales.events",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
- "ConstructTypeName": "Aggregate Functions",
+ "ConstructTypeName": "Range aggregate Functions",
"Query": "SELECT range_agg(event_range) AS union_of_ranges\nFROM sales.events",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
- "ConstructTypeName": "Aggregate Functions",
+ "ConstructTypeName": "ANY_VALUE() aggregate Function",
"Query": "SELECT\n any_value(name) AS any_employee\n FROM employees",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
"MinimumVersionsFixedIn": null
@@ -280,25 +295,33 @@
"ConstructTypeName": "Jsonb Subscripting",
"Query": "SELECT \n data,\n data[$1] AS name, \n (data[$2]) as active\nFROM sales.test_json_chk",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"ConstructTypeName": "Jsonb Subscripting",
"Query": "SELECT (sales.get_user_info($1))[$2] AS user_info",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"ConstructTypeName": "Jsonb Subscripting",
"Query": "SELECT (jsonb_build_object($1, $2, $3, $4, $5, $6) || $7)[$8] AS json_obj",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"ConstructTypeName": "Jsonb Subscripting",
"Query": "SELECT ($1 :: jsonb)[$2][$3] as b",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"ConstructTypeName": "Json Type Predicate",
@@ -310,13 +333,17 @@
"ConstructTypeName": "CTE with MATERIALIZE clause",
"Query": "WITH w AS NOT MATERIALIZED ( \n SELECT * FROM sales.big_table\n) \nSELECT * FROM w AS w1 JOIN w AS w2 ON w1.key = w2.ref\nWHERE w2.key = $1",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"ConstructTypeName": "CTE with MATERIALIZE clause",
"Query": "WITH w AS MATERIALIZED ( \n SELECT * FROM sales.big_table\n) \nSELECT * FROM w AS w1 JOIN w AS w2 ON w1.key = w2.ref\nWHERE w2.key = $1",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
}
],
"UnsupportedPlPgSqlObjects": [
@@ -330,7 +357,9 @@
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
}
]
}
\ No newline at end of file
diff --git a/migtests/tests/pg/assessment-report-test/expectedAssessmentReport.json b/migtests/tests/pg/assessment-report-test/expectedAssessmentReport.json
index 64b2666fd0..fc90e83a1c 100644
--- a/migtests/tests/pg/assessment-report-test/expectedAssessmentReport.json
+++ b/migtests/tests/pg/assessment-report-test/expectedAssessmentReport.json
@@ -465,7 +465,9 @@
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#generated-always-as-stored-type-column-is-not-supported",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"FeatureName": "BEFORE ROW triggers on Partitioned tables",
@@ -476,7 +478,9 @@
}
],
"DocsLink":"https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#before-row-triggers-on-partitioned-tables",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"FeatureName": "Exclusion constraints",
@@ -525,7 +529,9 @@
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"FeatureName": "View with check option",
@@ -622,7 +628,9 @@
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"FeatureName": "Primary / Unique key constraints on complex datatypes",
@@ -696,7 +704,9 @@
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"FeatureName": "Regex Functions",
@@ -707,7 +717,9 @@
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"FeatureName": "FETCH .. WITH TIES Clause",
@@ -733,7 +745,9 @@
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"FeatureName": "Unique Nulls Not Distinct",
@@ -772,7 +786,9 @@
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
}
],
"UnsupportedFeaturesDesc": "Features of the source database that are not supported on the target YugabyteDB.",
@@ -2903,7 +2919,9 @@
"ConstructTypeName": "COPY FROM ... WHERE",
"Query": "COPY employeesCopyFromWhere (id, name, age)\nFROM STDIN WITH (FORMAT csv)\nWHERE age \u003e 30",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"ConstructTypeName": "COPY ... ON_ERROR",
diff --git a/migtests/tests/pg/omnibus/expected_files/expectedAssessmentReport.json b/migtests/tests/pg/omnibus/expected_files/expectedAssessmentReport.json
index 753c5c4ca6..f811009b30 100755
--- a/migtests/tests/pg/omnibus/expected_files/expectedAssessmentReport.json
+++ b/migtests/tests/pg/omnibus/expected_files/expectedAssessmentReport.json
@@ -541,7 +541,9 @@
}
],
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#generated-always-as-stored-type-column-is-not-supported",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"FeatureName": "Conversion objects",
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 2d45e281b1..0a014ecfa5 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
@@ -198,7 +198,9 @@
"Suggestion": "Using Triggers to update the generated columns is one way to work around this issue, refer docs link for more details.",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/10695",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#generated-always-as-stored-type-column-is-not-supported",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
@@ -210,7 +212,9 @@
"Suggestion": "Using Triggers to update the generated columns is one way to work around this issue, refer docs link for more details.",
"GH": "https://github.com/yugabyte/yugabyte-db/issues/10695",
"DocsLink": "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#generated-always-as-stored-type-column-is-not-supported",
- "MinimumVersionsFixedIn": null
+ "MinimumVersionsFixedIn": {
+ "2.25": "2.25.0.0"
+ }
},
{
"IssueType": "unsupported_features",
diff --git a/yb-voyager/cmd/assessMigrationCommand.go b/yb-voyager/cmd/assessMigrationCommand.go
index 7ab3f61916..41c6c88f8c 100644
--- a/yb-voyager/cmd/assessMigrationCommand.go
+++ b/yb-voyager/cmd/assessMigrationCommand.go
@@ -1068,7 +1068,8 @@ func fetchUnsupportedPGFeaturesFromSchemaReport(schemaAnalysisReport utils.Schem
unsupportedFeatures = append(unsupportedFeatures, getUnsupportedFeaturesFromSchemaAnalysisReport(FETCH_WITH_TIES_FEATURE, "", queryissue.FETCH_WITH_TIES, schemaAnalysisReport, false))
unsupportedFeatures = append(unsupportedFeatures, getUnsupportedFeaturesFromSchemaAnalysisReport(queryissue.JSON_QUERY_FUNCTIONS_NAME, "", queryissue.JSON_QUERY_FUNCTION, schemaAnalysisReport, false))
unsupportedFeatures = append(unsupportedFeatures, getUnsupportedFeaturesFromSchemaAnalysisReport(queryissue.JSON_CONSTRUCTOR_FUNCTION_NAME, "", queryissue.JSON_CONSTRUCTOR_FUNCTION, schemaAnalysisReport, false))
- unsupportedFeatures = append(unsupportedFeatures, getUnsupportedFeaturesFromSchemaAnalysisReport(queryissue.AGGREGATION_FUNCTIONS_NAME, "", queryissue.AGGREGATE_FUNCTION, schemaAnalysisReport, false))
+ unsupportedFeatures = append(unsupportedFeatures, getUnsupportedFeaturesFromSchemaAnalysisReport(queryissue.ANY_VALUE_AGGREGATE_FUNCTION_NAME, "", queryissue.ANY_VALUE_AGGREGATE_FUNCTION, schemaAnalysisReport, false))
+ unsupportedFeatures = append(unsupportedFeatures, getUnsupportedFeaturesFromSchemaAnalysisReport(queryissue.RANGE_AGGREGATE_FUNCTION_NAME, "", queryissue.RANGE_AGGREGATE_FUNCTION, schemaAnalysisReport, false))
unsupportedFeatures = append(unsupportedFeatures, getUnsupportedFeaturesFromSchemaAnalysisReport(queryissue.SECURITY_INVOKER_VIEWS_NAME, "", queryissue.SECURITY_INVOKER_VIEWS, schemaAnalysisReport, false))
unsupportedFeatures = append(unsupportedFeatures, getUnsupportedFeaturesFromSchemaAnalysisReport(queryissue.DETERMINISTIC_OPTION_WITH_COLLATION_NAME, "", queryissue.DETERMINISTIC_OPTION_WITH_COLLATION, schemaAnalysisReport, false))
unsupportedFeatures = append(unsupportedFeatures, getUnsupportedFeaturesFromSchemaAnalysisReport(queryissue.UNIQUE_NULLS_NOT_DISTINCT_NAME, "", queryissue.UNIQUE_NULLS_NOT_DISTINCT, schemaAnalysisReport, false))
@@ -1247,6 +1248,7 @@ func fetchUnsupportedPlPgSQLObjects(schemaAnalysisReport utils.SchemaReport) []U
DisplayDDL: true,
DocsLink: docsLink,
Objects: objects,
+ MinimumVersionsFixedIn: minVersionsFixedIn,
}
unsupportedPlpgSqlObjects = append(unsupportedPlpgSqlObjects, feature)
}
diff --git a/yb-voyager/cmd/importDataFileBatchProducer_test.go b/yb-voyager/cmd/importDataFileBatchProducer_test.go
index c33ca04750..538b4e9e97 100644
--- a/yb-voyager/cmd/importDataFileBatchProducer_test.go
+++ b/yb-voyager/cmd/importDataFileBatchProducer_test.go
@@ -24,6 +24,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
+
"github.com/yugabyte/yb-voyager/yb-voyager/src/constants"
"github.com/yugabyte/yb-voyager/yb-voyager/src/datafile"
"github.com/yugabyte/yb-voyager/yb-voyager/src/datastore"
@@ -74,7 +75,7 @@ func createFileAndTask(lexportDir string, fileContents string, ldataDir string,
EscapeChar: '\\',
NullString: "NULL",
}
- tempFile, err := testutils.CreateTempFile(ldataDir, fileContents)
+ tempFile, err := testutils.CreateTempFile(ldataDir, fileContents, dataFileDescriptor.FileFormat)
if err != nil {
return "", nil, err
}
diff --git a/yb-voyager/src/query/queryissue/constants.go b/yb-voyager/src/query/queryissue/constants.go
index 6b6ed9d479..4685553517 100644
--- a/yb-voyager/src/query/queryissue/constants.go
+++ b/yb-voyager/src/query/queryissue/constants.go
@@ -49,8 +49,11 @@ const (
FOREIGN_TABLE = "FOREIGN_TABLE"
INHERITANCE = "INHERITANCE"
- AGGREGATE_FUNCTION = "AGGREGATE_FUNCTION"
- AGGREGATION_FUNCTIONS_NAME = "Aggregate Functions"
+ ANY_VALUE_AGGREGATE_FUNCTION = "ANY_VALUE_AGGREGATE_FUNCTION"
+ ANY_VALUE_AGGREGATE_FUNCTION_NAME = "ANY_VALUE() aggregate Function"
+ RANGE_AGGREGATE_FUNCTION = "RANGE_AGGREGATE_FUNCTION"
+ RANGE_AGGREGATE_FUNCTION_NAME = "Range aggregate Functions"
+
JSON_TYPE_PREDICATE = "JSON_TYPE_PREDICATE"
JSON_TYPE_PREDICATE_NAME = "Json Type Predicate"
JSON_CONSTRUCTOR_FUNCTION = "JSON_CONSTRUCTOR_FUNCTION"
@@ -109,20 +112,21 @@ const (
// Note: Any issue description added here should be updated in reasonsIncludingSensitiveInformationToCallhome slice in analyzeSchema.go
const (
// for DMLs
- ADVISORY_LOCKS_ISSUE_DESCRIPTION = "Advisory locks are not yet implemented in YugabyteDB"
- SYSTEM_COLUMNS_ISSUE_DESCRIPTION = "System columns are not yet supported in YugabyteDB"
- XML_FUNCTIONS_ISSUE_DESCRIPTION = "XML functions are not yet supported in YugabyteDB"
- REGEX_FUNCTIONS_ISSUE_DESCRIPTION = "Regex functions are not yet supported in YugabyteDB"
- AGGREGATE_FUNCTION_ISSUE_DESCRIPTION = "any_value, range_agg and range_intersect_agg functions are not supported yet in YugabyteDB"
- JSON_CONSTRUCTOR_FUNCTION_ISSUE_DESCRIPTION = "JSON constructor functions from PostgreSQL 17 are not yet supported in YugabyteDB"
- JSON_QUERY_FUNCTION_ISSUE_DESCRIPTION = "JSON query functions from PostgreSQL 17 are not yet supported in YugabyteDB"
- LO_FUNCTIONS_ISSUE_DESCRIPTION = "Large Objects functions are not supported in YugabyteDB"
- JSONB_SUBSCRIPTING_ISSUE_DESCRIPTION = "Jsonb subscripting is not yet supported in YugabyteDB"
- JSON_PREDICATE_ISSUE_DESCRIPTION = "IS JSON predicate expressions are not yet supported in YugabyteDB"
- COPY_FROM_WHERE_ISSUE_DESCRIPTION = "COPY FROM ... WHERE is not yet supported in YugabyteDB"
- COPY_ON_ERROR_ISSUE_DESCRIPTION = "COPY ... ON_ERROR is not yet supported in YugabyteDB"
- FETCH_WITH_TIES_ISSUE_DESCRIPTION = "FETCH .. WITH TIES is not yet supported in YugabyteDB"
- MERGE_STATEMENT_ISSUE_DESCRIPTION = "MERGE statement is not yet supported in YugabyteDB"
+ ADVISORY_LOCKS_ISSUE_DESCRIPTION = "Advisory locks are not yet implemented in YugabyteDB."
+ SYSTEM_COLUMNS_ISSUE_DESCRIPTION = "System columns are not yet supported in YugabyteDB."
+ XML_FUNCTIONS_ISSUE_DESCRIPTION = "XML functions are not yet supported in YugabyteDB."
+ REGEX_FUNCTIONS_ISSUE_DESCRIPTION = "Regex functions are not yet supported in YugabyteDB."
+ ANY_VALUE_AGGREGATE_FUNCTION_ISSUE_DESCRIPTION = "any_value function are not supported yet in YugabyteDB."
+ RANGE_AGGREGATE_FUNCTION_ISSUE_DESCRIPTION = "range_agg, range_intersect_agg function are not supported yet in YugabyteDB."
+ JSON_CONSTRUCTOR_FUNCTION_ISSUE_DESCRIPTION = "JSON constructor functions from PostgreSQL 17 are not yet supported in YugabyteDB."
+ JSON_QUERY_FUNCTION_ISSUE_DESCRIPTION = "JSON query functions from PostgreSQL 17 are not yet supported in YugabyteDB."
+ LO_FUNCTIONS_ISSUE_DESCRIPTION = "Large Objects functions are not supported in YugabyteDB."
+ JSONB_SUBSCRIPTING_ISSUE_DESCRIPTION = "Jsonb subscripting is not yet supported in YugabyteDB."
+ JSON_PREDICATE_ISSUE_DESCRIPTION = "IS JSON predicate expressions are not yet supported in YugabyteDB."
+ COPY_FROM_WHERE_ISSUE_DESCRIPTION = "COPY FROM ... WHERE is not yet supported in YugabyteDB."
+ COPY_ON_ERROR_ISSUE_DESCRIPTION = "COPY ... ON_ERROR is not yet supported in YugabyteDB."
+ FETCH_WITH_TIES_ISSUE_DESCRIPTION = "FETCH .. WITH TIES is not yet supported in YugabyteDB."
+ MERGE_STATEMENT_ISSUE_DESCRIPTION = "MERGE statement is not yet supported in YugabyteDB."
// for DDLs
// NOTE: In Description string we something can be sensitive information(like object names) which should not be sent to callhome
diff --git a/yb-voyager/src/query/queryissue/detectors.go b/yb-voyager/src/query/queryissue/detectors.go
index 7f6c895d08..e4e6dbbe78 100644
--- a/yb-voyager/src/query/queryissue/detectors.go
+++ b/yb-voyager/src/query/queryissue/detectors.go
@@ -37,9 +37,10 @@ type FuncCallDetector struct {
advisoryLocksFuncsDetected mapset.Set[string]
xmlFuncsDetected mapset.Set[string]
- aggFuncsDetected mapset.Set[string]
+ rangeAggFuncsDetected mapset.Set[string]
regexFuncsDetected mapset.Set[string]
loFuncsDetected mapset.Set[string]
+ anyValueFuncDetected bool
}
func NewFuncCallDetector(query string) *FuncCallDetector {
@@ -47,7 +48,7 @@ func NewFuncCallDetector(query string) *FuncCallDetector {
query: query,
advisoryLocksFuncsDetected: mapset.NewThreadUnsafeSet[string](),
xmlFuncsDetected: mapset.NewThreadUnsafeSet[string](),
- aggFuncsDetected: mapset.NewThreadUnsafeSet[string](),
+ rangeAggFuncsDetected: mapset.NewThreadUnsafeSet[string](),
regexFuncsDetected: mapset.NewThreadUnsafeSet[string](),
loFuncsDetected: mapset.NewThreadUnsafeSet[string](),
}
@@ -72,9 +73,14 @@ func (d *FuncCallDetector) Detect(msg protoreflect.Message) error {
d.regexFuncsDetected.Add(funcName)
}
- if unsupportedAggFunctions.ContainsOne(funcName) {
- d.aggFuncsDetected.Add(funcName)
+ if unsupportedRangeAggFunctions.ContainsOne(funcName) {
+ d.rangeAggFuncsDetected.Add(funcName)
}
+
+ if funcName == ANY_VALUE {
+ d.anyValueFuncDetected = true
+ }
+
if unsupportedLargeObjectFunctions.ContainsOne(funcName) {
d.loFuncsDetected.Add(funcName)
}
@@ -90,8 +96,11 @@ func (d *FuncCallDetector) GetIssues() []QueryIssue {
if d.xmlFuncsDetected.Cardinality() > 0 {
issues = append(issues, NewXmlFunctionsIssue(DML_QUERY_OBJECT_TYPE, "", d.query))
}
- if d.aggFuncsDetected.Cardinality() > 0 {
- issues = append(issues, NewAggregationFunctionIssue(DML_QUERY_OBJECT_TYPE, "", d.query, d.aggFuncsDetected.ToSlice()))
+ if d.rangeAggFuncsDetected.Cardinality() > 0 {
+ issues = append(issues, NewRangeAggregateFunctionIssue(DML_QUERY_OBJECT_TYPE, "", d.query, d.rangeAggFuncsDetected.ToSlice()))
+ }
+ if d.anyValueFuncDetected {
+ issues = append(issues, NewAnyValueAggregateFunctionIssue(DML_QUERY_OBJECT_TYPE, "", d.query))
}
if d.regexFuncsDetected.Cardinality() > 0 {
issues = append(issues, NewRegexFunctionsIssue(DML_QUERY_OBJECT_TYPE, "", d.query))
diff --git a/yb-voyager/src/query/queryissue/helpers.go b/yb-voyager/src/query/queryissue/helpers.go
index dfc89f1197..d28ef94548 100644
--- a/yb-voyager/src/query/queryissue/helpers.go
+++ b/yb-voyager/src/query/queryissue/helpers.go
@@ -102,12 +102,14 @@ var UnsupportedIndexDatatypes = []string{
// array as well but no need to add it in the list as fetching this type is a different way TODO: handle better with specific types
}
-var unsupportedAggFunctions = mapset.NewThreadUnsafeSet([]string{
- //agg function added in PG16 - https://www.postgresql.org/docs/16/functions-aggregate.html#id-1.5.8.27.5.2.4.1.1.1.1
- "any_value", "range_agg", "range_intersect_agg",
+var unsupportedRangeAggFunctions = mapset.NewThreadUnsafeSet([]string{
+ //range agg function added in PG15 - https://www.postgresql.org/docs/15/functions-aggregate.html#:~:text=Yes-,range_agg,-(%20value%20anyrange
+ "range_agg", "range_intersect_agg",
}...)
const (
+ ANY_VALUE = "any_value" //any_value function is added in PG16 - https://www.postgresql.org/docs/16/functions-aggregate.html#id-1.5.8.27.5.2.4.1.1.1.1
+
// // json functions, refer - https://www.postgresql.org/about/featurematrix/detail/395/
JSON_OBJECTAGG = "JSON_OBJECTAGG"
JSON_ARRAY = "JSON_ARRAY"
diff --git a/yb-voyager/src/query/queryissue/issues_ddl.go b/yb-voyager/src/query/queryissue/issues_ddl.go
index b0ef2fbe38..a05baa50d9 100644
--- a/yb-voyager/src/query/queryissue/issues_ddl.go
+++ b/yb-voyager/src/query/queryissue/issues_ddl.go
@@ -33,6 +33,9 @@ var generatedColumnsIssue = issue.Issue{
GH: "https://github.com/yugabyte/yugabyte-db/issues/10695",
Suggestion: "Using Triggers to update the generated columns is one way to work around this issue, refer docs link for more details.",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#generated-always-as-stored-type-column-is-not-supported",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
}
func NewGeneratedColumnsIssue(objectType string, objectName string, sqlStatement string, generatedColumns []string) QueryIssue {
@@ -51,6 +54,7 @@ var unloggedTableIssue = issue.Issue{
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#unlogged-table-is-not-supported",
MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
ybversion.SERIES_2024_2: ybversion.V2024_2_0_0,
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
},
}
@@ -247,6 +251,10 @@ var beforeRowTriggerOnPartitionTableIssue = issue.Issue{
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#before-row-triggers-on-partitioned-tables",
GH: "https://github.com/yugabyte/yugabyte-db/issues/24830",
Suggestion: "Create the triggers on individual partitions.",
+
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
}
func NewBeforeRowOnPartitionTableIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
@@ -265,6 +273,7 @@ var alterTableAddPKOnPartitionIssue = issue.Issue{
ybversion.SERIES_2024_1: ybversion.V2024_1_0_0,
ybversion.SERIES_2024_2: ybversion.V2024_2_0_0,
ybversion.SERIES_2_23: ybversion.V2_23_0_0,
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
},
}
@@ -511,6 +520,9 @@ var multiRangeDatatypeIssue = issue.Issue{
Suggestion: "Multirange data type is not yet supported in YugabyteDB, no workaround available currently",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
}
func NewMultiRangeDatatypeIssue(objectType string, objectName string, sqlStatement string, typeName string, colName string) QueryIssue {
@@ -527,6 +539,9 @@ var securityInvokerViewIssue = issue.Issue{
Suggestion: "Security Invoker Views are not yet supported in YugabyteDB, no workaround available currently",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
}
func NewSecurityInvokerViewIssue(objectType string, objectName string, SqlStatement string) QueryIssue {
@@ -541,6 +556,10 @@ var deterministicOptionCollationIssue = issue.Issue{
Suggestion: "This feature is not supported in YugabyteDB yet",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0, // TODO: understand why docs says coming soon non-deterministic collation but the CREATE COLLAITON works on 2.25
+ //https://docs.yugabyte.com/preview/develop/pg15-features/#:~:text=Consider%20strings%20to%20be%20equal%20even%20if%20they%20consist%20of%20different%20bytes%2C%20for%20example%2C%20case%2Dinsensitive%2C%20or%20accent%2Dinsensitive%20comparisons.
+ },
}
func NewDeterministicOptionCollationIssue(objectType string, objectName string, SqlStatement string) QueryIssue {
@@ -555,6 +574,9 @@ var foreignKeyReferencesPartitionedTableIssue = issue.Issue{
Suggestion: "No workaround available ",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
}
func NewForeignKeyReferencesPartitionedTableIssue(objectType string, objectName string, SqlStatement string, constraintName string) QueryIssue {
@@ -572,6 +594,9 @@ var sqlBodyInFunctionIssue = issue.Issue{
Suggestion: "No workaround available",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
}
func NewSqlBodyInFunctionIssue(objectType string, objectName string, SqlStatement string) QueryIssue {
@@ -586,6 +611,9 @@ var uniqueNullsNotDistinctIssue = issue.Issue{
Suggestion: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
}
func NewUniqueNullsNotDistinctIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
diff --git a/yb-voyager/src/query/queryissue/issues_ddl_test.go b/yb-voyager/src/query/queryissue/issues_ddl_test.go
index 1eb15b9d0c..4d076d1378 100644
--- a/yb-voyager/src/query/queryissue/issues_ddl_test.go
+++ b/yb-voyager/src/query/queryissue/issues_ddl_test.go
@@ -78,7 +78,7 @@ func testXMLFunctionIssue(t *testing.T) {
defer conn.Close(context.Background())
_, err = conn.Exec(ctx, "SELECT xmlconcat('', 'foo')")
- assert.ErrorContains(t, err, "unsupported XML feature")
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, "unsupported XML feature", xmlFunctionsIssue)
}
func testStoredGeneratedFunctionsIssue(t *testing.T) {
@@ -94,7 +94,7 @@ func testStoredGeneratedFunctionsIssue(t *testing.T) {
width NUMERIC NOT NULL,
area NUMERIC GENERATED ALWAYS AS (length * width) STORED
)`)
- assert.ErrorContains(t, err, "syntax error")
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, "syntax error", generatedColumnsIssue)
}
func testUnloggedTableIssue(t *testing.T) {
@@ -142,7 +142,14 @@ func testSetAttributeIssue(t *testing.T) {
);
ALTER TABLE ONLY public.event_search ALTER COLUMN room_id SET (n_distinct=-0.01)`)
- assertErrorCorrectlyThrownForIssueForYBVersion(t, err, "ALTER TABLE ALTER column not supported yet", setColumnAttributeIssue)
+ var errMsg string
+ switch {
+ case testYbVersion.Equal(ybversion.V2_25_0_0):
+ errMsg = `ALTER action ALTER COLUMN ... SET not supported yet`
+ default:
+ errMsg = "ALTER TABLE ALTER column not supported yet"
+ }
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, errMsg, setColumnAttributeIssue)
}
func testClusterOnIssue(t *testing.T) {
@@ -162,7 +169,14 @@ func testClusterOnIssue(t *testing.T) {
ALTER TABLE public.test CLUSTER ON test_age_salary`)
- assertErrorCorrectlyThrownForIssueForYBVersion(t, err, "ALTER TABLE CLUSTER not supported yet", alterTableClusterOnIssue)
+ var errMsg string
+ switch {
+ case testYbVersion.Equal(ybversion.V2_25_0_0):
+ errMsg = "ALTER action CLUSTER ON not supported yet"
+ default:
+ errMsg = "ALTER TABLE CLUSTER not supported yet"
+ }
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, errMsg, alterTableClusterOnIssue)
}
func testDisableRuleIssue(t *testing.T) {
@@ -178,7 +192,14 @@ func testDisableRuleIssue(t *testing.T) {
ALTER TABLE trule DISABLE RULE trule_rule`)
- assertErrorCorrectlyThrownForIssueForYBVersion(t, err, "ALTER TABLE DISABLE RULE not supported yet", alterTableDisableRuleIssue)
+ var errMsg string
+ switch {
+ case testYbVersion.Equal(ybversion.V2_25_0_0):
+ errMsg = "ALTER action DISABLE RULE not supported yet"
+ default:
+ errMsg = "ALTER TABLE DISABLE RULE not supported yet"
+ }
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, errMsg, alterTableDisableRuleIssue)
}
func testStorageParameterIssue(t *testing.T) {
@@ -283,7 +304,7 @@ func testDeterministicCollationIssue(t *testing.T) {
_, err = conn.Exec(ctx, `
CREATE COLLATION case_insensitive (provider = icu, locale = 'und-u-ks-level2', deterministic = false);`)
- assertErrorCorrectlyThrownForIssueForYBVersion(t, err, `collation attribute "deterministic" not recognized`, securityInvokerViewIssue)
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, `collation attribute "deterministic" not recognized`, deterministicOptionCollationIssue)
}
func testForeignKeyReferencesPartitionedTableIssue(t *testing.T) {
@@ -305,7 +326,7 @@ func testSQLBodyInFunctionIssue(t *testing.T) {
RETURNS text
LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE
RETURN repeat('*', n);`: `syntax error at or near "RETURN"`,
- `CREATE OR REPLACE FUNCTION asterisks(n int)
+ `CREATE OR REPLACE FUNCTION asterisks1(n int)
RETURNS SETOF text
LANGUAGE sql IMMUTABLE STRICT PARALLEL SAFE
BEGIN ATOMIC
@@ -319,7 +340,6 @@ END;`: `syntax error at or near "BEGIN"`,
defer conn.Close(context.Background())
_, err = conn.Exec(ctx, sql)
-
assertErrorCorrectlyThrownForIssueForYBVersion(t, err, errMsg, sqlBodyInFunctionIssue)
}
}
@@ -330,8 +350,7 @@ func testUniqueNullsNotDistinctIssue(t *testing.T) {
assert.NoError(t, err)
defer conn.Close(context.Background())
- _, err = conn.Exec(ctx, `
- CREATE TABLE public.products (
+ _, err = conn.Exec(ctx, `CREATE TABLE public.products (
id INTEGER PRIMARY KEY,
product_name VARCHAR(100),
serial_number TEXT,
@@ -341,6 +360,39 @@ func testUniqueNullsNotDistinctIssue(t *testing.T) {
assertErrorCorrectlyThrownForIssueForYBVersion(t, err, "syntax error", uniqueNullsNotDistinctIssue)
}
+func testBeforeRowTriggerOnPartitionedTable(t *testing.T) {
+ ctx := context.Background()
+ conn, err := getConn()
+ assert.NoError(t, err)
+
+ defer conn.Close(context.Background())
+ _, err = conn.Exec(ctx, `
+CREATE TABLE sales_region (id int, amount int, branch text, region text, PRIMARY KEY(id, region)) PARTITION BY LIST (region);
+
+CREATE OR REPLACE FUNCTION public.check_sales_region()
+RETURNS TRIGGER AS $$
+BEGIN
+
+ IF NEW.amount < 0 THEN
+ RAISE EXCEPTION 'Amount cannot be negative';
+ END IF;
+
+ IF NEW.branch IS NULL OR NEW.branch = '' THEN
+ RAISE EXCEPTION 'Branch name cannot be null or empty';
+ END IF;
+
+ RETURN NEW;
+END;
+$$ LANGUAGE plpgsql;
+
+CREATE TRIGGER before_sales_region_insert_update
+BEFORE INSERT OR UPDATE ON public.sales_region
+FOR EACH ROW
+EXECUTE FUNCTION public.check_sales_region();`)
+
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, `"sales_region" is a partitioned table`, beforeRowTriggerOnPartitionTableIssue)
+}
+
func TestDDLIssuesInYBVersion(t *testing.T) {
var err error
ybVersion := os.Getenv("YB_VERSION")
@@ -408,7 +460,10 @@ func TestDDLIssuesInYBVersion(t *testing.T) {
success = t.Run(fmt.Sprintf("%s-%s", "sql body in function", ybVersion), testSQLBodyInFunctionIssue)
assert.True(t, success)
-
+
success = t.Run(fmt.Sprintf("%s-%s", "unique nulls not distinct", ybVersion), testUniqueNullsNotDistinctIssue)
assert.True(t, success)
+
+ success = t.Run(fmt.Sprintf("%s-%s", "before row triggers on partitioned table", ybVersion), testBeforeRowTriggerOnPartitionedTable)
+ assert.True(t, success)
}
diff --git a/yb-voyager/src/query/queryissue/issues_dml.go b/yb-voyager/src/query/queryissue/issues_dml.go
index 843dd5224c..d01c36cde2 100644
--- a/yb-voyager/src/query/queryissue/issues_dml.go
+++ b/yb-voyager/src/query/queryissue/issues_dml.go
@@ -21,6 +21,7 @@ import (
"github.com/yugabyte/yb-voyager/yb-voyager/src/constants"
"github.com/yugabyte/yb-voyager/yb-voyager/src/issue"
+ "github.com/yugabyte/yb-voyager/yb-voyager/src/ybversion"
)
var advisoryLocksIssue = issue.Issue{
@@ -73,28 +74,48 @@ var regexFunctionsIssue = issue.Issue{
Suggestion: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
}
func NewRegexFunctionsIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
return newQueryIssue(regexFunctionsIssue, objectType, objectName, sqlStatement, map[string]interface{}{})
}
-var aggregateFunctionIssue = issue.Issue{
- Type: AGGREGATE_FUNCTION,
- Name: AGGREGATION_FUNCTIONS_NAME,
+var anyValueAggregateFunction = issue.Issue{
+ Type: ANY_VALUE_AGGREGATE_FUNCTION,
+ Name: ANY_VALUE_AGGREGATE_FUNCTION_NAME,
Impact: constants.IMPACT_LEVEL_2,
- Description: AGGREGATE_FUNCTION_ISSUE_DESCRIPTION,
+ Description: ANY_VALUE_AGGREGATE_FUNCTION_ISSUE_DESCRIPTION,
Suggestion: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
}
-func NewAggregationFunctionIssue(objectType string, objectName string, sqlStatement string, funcNames []string) QueryIssue {
+func NewAnyValueAggregateFunctionIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
+ return newQueryIssue(anyValueAggregateFunction, objectType, objectName, sqlStatement, map[string]interface{}{})
+}
+
+var rangeAggregateFunctionIssue = issue.Issue{
+ Type: RANGE_AGGREGATE_FUNCTION,
+ Name: RANGE_AGGREGATE_FUNCTION_NAME,
+ Impact: constants.IMPACT_LEVEL_2,
+ Description: RANGE_AGGREGATE_FUNCTION_ISSUE_DESCRIPTION,
+ Suggestion: "",
+ GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
+ DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
+}
+
+func NewRangeAggregateFunctionIssue(objectType string, objectName string, sqlStatement string, funcNames []string) QueryIssue {
sort.Strings(funcNames)
details := map[string]interface{}{
FUNCTION_NAMES: funcNames, //TODO USE it later when we start putting these in reports
}
- return newQueryIssue(aggregateFunctionIssue, objectType, objectName, sqlStatement, details)
+ return newQueryIssue(rangeAggregateFunctionIssue, objectType, objectName, sqlStatement, details)
}
var jsonConstructorFunctionsIssue = issue.Issue{
@@ -158,6 +179,9 @@ var jsonbSubscriptingIssue = issue.Issue{
Suggestion: "Use Arrow operators (-> / ->>) to access the jsonb fields.",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#jsonb-subscripting",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
}
func NewJsonbSubscriptingIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
@@ -186,6 +210,9 @@ var copyFromWhereIssue = issue.Issue{
Suggestion: "",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0,
+ },
}
func NewCopyFromWhereIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
@@ -227,6 +254,9 @@ var cteWithMaterializedIssue = issue.Issue{
Suggestion: "No workaround available right now",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25575",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#postgresql-12-and-later-features",
+ MinimumVersionsFixedIn: map[string]*ybversion.YBVersion{
+ ybversion.SERIES_2_25: ybversion.V2_25_0_0, //TODO: understand in NOT MATERIALIZED works as expected internally
+ },
}
func NewCTEWithMaterializedIssue(objectType string, objectName string, sqlStatement string) QueryIssue {
@@ -238,7 +268,7 @@ var mergeStatementIssue = issue.Issue{
Name: "Merge Statement",
Impact: constants.IMPACT_LEVEL_2,
Description: MERGE_STATEMENT_ISSUE_DESCRIPTION,
- Suggestion: "Use PL/pgSQL to write the logic to get this functionality",
+ Suggestion: "Use PL/pgSQL to write the logic to get this functionality.",
GH: "https://github.com/yugabyte/yugabyte-db/issues/25574",
DocsLink: "https://docs.yugabyte.com/preview/yugabyte-voyager/known-issues/postgresql/#merge-command",
}
diff --git a/yb-voyager/src/query/queryissue/issues_dml_test.go b/yb-voyager/src/query/queryissue/issues_dml_test.go
index 5e86ebfdae..06d3d5137e 100644
--- a/yb-voyager/src/query/queryissue/issues_dml_test.go
+++ b/yb-voyager/src/query/queryissue/issues_dml_test.go
@@ -51,7 +51,7 @@ func testJsonbSubscriptingIssue(t *testing.T) {
defer conn.Close(context.Background())
_, err = conn.Exec(ctx, `SELECT ('{"a": {"b": {"c": 1}}}'::jsonb)['a']['b']['c'];`)
- assertErrorCorrectlyThrownForIssueForYBVersion(t, err, "cannot subscript type jsonb because it is not an array", loDatatypeIssue)
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, "cannot subscript type jsonb because it is not an array", jsonbSubscriptingIssue)
}
func testRegexFunctionsIssue(t *testing.T) {
@@ -80,7 +80,8 @@ func testFetchWithTiesIssue(t *testing.T) {
defer conn.Close(context.Background())
stmts := []string{
- `SELECT * FROM employees
+ `CREATE TABLE fetch_table(id int, salary bigint);
+ SELECT * FROM fetch_table
ORDER BY salary DESC
FETCH FIRST 2 ROWS WITH TIES;`,
}
@@ -96,10 +97,35 @@ func testCopyOnErrorIssue(t *testing.T) {
conn, err := getConn()
assert.NoError(t, err)
+ // Write the csv content to the file
+ //4th row has error
+ csvData := `id,name,value
+1,Item1,10
+2,Item2,20
+3,Item3,30
+4|Item4,40
+5,Item5,50
+6,Item6,60
+7,Item7,70
+8,Item8,80
+9,Item9,90
+10,Item10,100`
+
+ fileName, err := testutils.CreateTempFile("/tmp", csvData, "csv")
+ assert.NoError(t, err)
+
defer conn.Close(context.Background())
// In case the COPY ... ON_ERROR construct gets supported in the future, this test will fail with a different error message-something related to the data.csv file not being found.
- _, err = conn.Exec(ctx, `COPY pg_largeobject (loid, pageno, data) FROM '/path/to/data.csv' WITH (FORMAT csv, HEADER true, ON_ERROR IGNORE);`)
+ _, err = conn.Exec(ctx, fmt.Sprintf(` CREATE TABLE my_table_copy_error (
+ id INT,
+ name TEXT,
+ value INT
+ );
+
+ COPY my_table_copy_error (id, name, value)
+ FROM '%s'
+ WITH (FORMAT csv, HEADER true, ON_ERROR IGNORE)`, fileName))
assertErrorCorrectlyThrownForIssueForYBVersion(t, err, "ERROR: option \"on_error\" not recognized (SQLSTATE 42601)", copyOnErrorIssue)
}
@@ -108,9 +134,34 @@ func testCopyFromWhereIssue(t *testing.T) {
conn, err := getConn()
assert.NoError(t, err)
+ // Write the csv content to the file
+ csvData := `id,name,value
+1,Item1,10
+2,Item2,20
+3,Item3,30
+4,Item4,40
+5,Item5,50
+6,Item6,60
+7,Item7,70
+8,Item8,80
+9,Item9,90
+10,Item10,100`
+
+ fileName, err := testutils.CreateTempFile("/tmp", csvData, "csv")
+ assert.NoError(t, err)
+
defer conn.Close(context.Background())
- // In case the COPY FROM ... WHERE construct gets supported in the future, this test will fail with a different error message-something related to the data.csv file not being found.
- _, err = conn.Exec(ctx, `COPY pg_largeobject (loid, pageno, data) FROM '/path/to/data.csv' WHERE loid = 1 WITH (FORMAT csv, HEADER true);`)
+ _, err = conn.Exec(ctx, fmt.Sprintf(`
+ CREATE TABLE my_table_copy_where (
+ id INT,
+ name TEXT,
+ value INT
+);
+
+ COPY my_table_copy_where (id, name, value)
+FROM '%s'
+WITH (FORMAT csv, HEADER true)
+WHERE id <=5;`, fileName))
assertErrorCorrectlyThrownForIssueForYBVersion(t, err, "ERROR: syntax error at or near \"WHERE\" (SQLSTATE 42601)", copyFromWhereIssue)
}
@@ -212,32 +263,20 @@ RETURNING merge_action(), w.*;
for _, sql := range sqls {
defer conn.Close(context.Background())
_, err = conn.Exec(ctx, sql)
-
- assertErrorCorrectlyThrownForIssueForYBVersion(t, err, `syntax error at or near "MERGE"`, mergeStatementIssue)
+ var errMsg string
+ switch {
+ case testYbVersion.Equal(ybversion.V2_25_0_0):
+ errMsg = "This statement not supported yet"
+ default:
+ errMsg = `syntax error at or near "MERGE"`
+ }
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, errMsg, mergeStatementIssue)
}
}
-func testAggFunctions(t *testing.T) {
+func testRangeAggFunctionsIssue(t *testing.T) {
sqls := []string{
- `CREATE TABLE any_value_ex (
- department TEXT,
- employee_name TEXT,
- salary NUMERIC
-);
-
-INSERT INTO any_value_ex VALUES
-('HR', 'Alice', 50000),
-('HR', 'Bob', 55000),
-('IT', 'Charlie', 60000),
-('IT', 'Diana', 62000);
-
-SELECT
- department,
- any_value(employee_name) AS any_employee
-FROM any_value_ex
-GROUP BY department;`,
-
`CREATE TABLE events (
id SERIAL PRIMARY KEY,
event_range daterange
@@ -249,9 +288,9 @@ INSERT INTO events (event_range) VALUES
('[2024-01-20, 2024-01-25]'::daterange);
SELECT range_agg(event_range) AS union_of_ranges
-FROM events;
+FROM events;`,
-SELECT range_intersect_agg(event_range) AS intersection_of_ranges
+ `SELECT range_intersect_agg(event_range) AS intersection_of_ranges
FROM events;`,
}
@@ -262,26 +301,53 @@ FROM events;`,
defer conn.Close(context.Background())
_, err = conn.Exec(ctx, sql)
-
- assertErrorCorrectlyThrownForIssueForYBVersion(t, err, `does not exist`, aggregateFunctionIssue)
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, `does not exist`, rangeAggregateFunctionIssue)
}
}
+func testAnyValueAggFunctions(t *testing.T) {
+ sql := `CREATE TABLE any_value_ex (
+ department TEXT,
+ employee_name TEXT,
+ salary NUMERIC
+);
+
+INSERT INTO any_value_ex VALUES
+('HR', 'Alice', 50000),
+('HR', 'Bob', 55000),
+('IT', 'Charlie', 60000),
+('IT', 'Diana', 62000);
+
+SELECT
+ department,
+ any_value(employee_name) AS any_employee
+FROM any_value_ex
+GROUP BY department;`
+
+ ctx := context.Background()
+ conn, err := getConn()
+ assert.NoError(t, err)
+
+ defer conn.Close(context.Background())
+ _, err = conn.Exec(ctx, sql)
+ assertErrorCorrectlyThrownForIssueForYBVersion(t, err, `does not exist`, anyValueAggregateFunction)
+
+}
+
func testCTEWithMaterializedIssue(t *testing.T) {
- sqls := map[string]string{`WITH w AS NOT MATERIALIZED (
+ sqls := map[string]string{`
+ CREATE TABLE big_table(key text, ref text, c1 int, c2 int);
+ WITH w AS NOT MATERIALIZED (
SELECT * FROM big_table
)
SELECT * FROM w AS w1 JOIN w AS w2 ON w1.key = w2.ref
- WHERE w2.key = 123;`: `syntax error at or near "NOT"`,
- `WITH moved_rows AS MATERIALIZED (
- DELETE FROM products
- WHERE
- "date" >= '2010-10-01' AND
- "date" < '2010-11-01'
- RETURNING *
+ WHERE w2.key = '123';`: `syntax error at or near "NOT"`,
+ `CREATE TABLE big_table1(key text, ref text, c1 int, c2 int);
+ WITH w AS MATERIALIZED (
+ SELECT * FROM big_table1
)
- INSERT INTO products_log
- SELECT * FROM moved_rows;`: `syntax error at or near "MATERIALIZED"`,
+ SELECT * FROM w AS w1 JOIN w AS w2 ON w1.key = w2.ref
+ WHERE w2.key = '123';`: `syntax error at or near "MATERIALIZED"`,
}
for sql, errMsg := range sqls {
ctx := context.Background()
@@ -345,7 +411,10 @@ func TestDMLIssuesInYBVersion(t *testing.T) {
success = t.Run(fmt.Sprintf("%s-%s", "json subscripting", ybVersion), testJsonbSubscriptingIssue)
assert.True(t, success)
- success = t.Run(fmt.Sprintf("%s-%s", "aggregate functions", ybVersion), testAggFunctions)
+ success = t.Run(fmt.Sprintf("%s-%s", "any-value aggregate functions", ybVersion), testAnyValueAggFunctions)
+ assert.True(t, success)
+
+ success = t.Run(fmt.Sprintf("%s-%s", "range aggregate functions", ybVersion), testRangeAggFunctionsIssue)
assert.True(t, success)
success = t.Run(fmt.Sprintf("%s-%s", "json type predicate", ybVersion), testJsonPredicateIssue)
diff --git a/yb-voyager/src/query/queryissue/parser_issue_detector_test.go b/yb-voyager/src/query/queryissue/parser_issue_detector_test.go
index 6ad5e0eda5..5705e1ee64 100644
--- a/yb-voyager/src/query/queryissue/parser_issue_detector_test.go
+++ b/yb-voyager/src/query/queryissue/parser_issue_detector_test.go
@@ -827,17 +827,17 @@ $$ LANGUAGE plpgsql;`,
}
aggregateSqls := map[string][]QueryIssue{
sqls[0]: []QueryIssue{
- NewAggregationFunctionIssue(DML_QUERY_OBJECT_TYPE, "", sqls[0], []string{"any_value"}),
+ NewAnyValueAggregateFunctionIssue(DML_QUERY_OBJECT_TYPE, "", sqls[0]),
},
sqls[1]: []QueryIssue{
- NewAggregationFunctionIssue(DML_QUERY_OBJECT_TYPE, "", sqls[1], []string{"range_intersect_agg"}),
+ NewRangeAggregateFunctionIssue(DML_QUERY_OBJECT_TYPE, "", sqls[1], []string{"range_intersect_agg"}),
},
sqls[2]: []QueryIssue{
- NewAggregationFunctionIssue(DML_QUERY_OBJECT_TYPE, "", sqls[2], []string{"range_agg"}),
+ NewRangeAggregateFunctionIssue(DML_QUERY_OBJECT_TYPE, "", sqls[2], []string{"range_agg"}),
},
sqls[3]: []QueryIssue{
- NewAggregationFunctionIssue(DML_QUERY_OBJECT_TYPE, "", "SELECT range_agg(range_value) FROM ranges;", []string{"range_agg"}),
- NewAggregationFunctionIssue(DML_QUERY_OBJECT_TYPE, "", sqls[0], []string{"any_value"}),
+ NewRangeAggregateFunctionIssue(DML_QUERY_OBJECT_TYPE, "", "SELECT range_agg(range_value) FROM ranges;", []string{"range_agg"}),
+ NewAnyValueAggregateFunctionIssue(DML_QUERY_OBJECT_TYPE, "", sqls[0]),
},
}
aggregateSqls[sqls[3]] = modifiedIssuesforPLPGSQL(aggregateSqls[sqls[3]], "FUNCTION", "aggregate_ranges")
diff --git a/yb-voyager/src/ybversion/constants.go b/yb-voyager/src/ybversion/constants.go
index afa2c125f8..35431e39d2 100644
--- a/yb-voyager/src/ybversion/constants.go
+++ b/yb-voyager/src/ybversion/constants.go
@@ -34,6 +34,8 @@ var V2024_2_0_0 *YBVersion
var V2_23_0_0 *YBVersion
+var V2_25_0_0 *YBVersion
+
func init() {
var err error
V2024_1_0_0, err = NewYBVersion("2024.1.0.0")
@@ -53,5 +55,9 @@ func init() {
if err != nil {
panic("could not create version 2.23.0.0")
}
+ V2_25_0_0, err = NewYBVersion("2.25.0.0")
+ if err != nil {
+ panic("could not create version 2.25.0.0")
+ }
LatestStable = V2024_2_0_0
}
diff --git a/yb-voyager/src/ybversion/yb_version_test.go b/yb-voyager/src/ybversion/yb_version_test.go
index e5e67b04ef..c06d75f754 100644
--- a/yb-voyager/src/ybversion/yb_version_test.go
+++ b/yb-voyager/src/ybversion/yb_version_test.go
@@ -109,7 +109,6 @@ func TestLatestStable(t *testing.T) {
err = json.Unmarshal(body, &releases)
assert.NoErrorf(t, err, "could not unmarshal response %q", string(body))
assert.NotEmpty(t, releases, "no releases found")
-
for _, r := range releases {
// sample - v2.20.7.1 (Released October 16, 2024)
releaseName := r.Name
diff --git a/yb-voyager/test/utils/testutils.go b/yb-voyager/test/utils/testutils.go
index f8a3418ab0..1f81356900 100644
--- a/yb-voyager/test/utils/testutils.go
+++ b/yb-voyager/test/utils/testutils.go
@@ -13,6 +13,7 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/stretchr/testify/assert"
+
"github.com/yugabyte/yb-voyager/yb-voyager/src/utils/sqlname"
)
@@ -407,9 +408,9 @@ func FatalIfError(t *testing.T, err error) {
}
}
-func CreateTempFile(dir string, fileContents string) (string, error) {
+func CreateTempFile(dir string, fileContents string, fileFormat string) (string, error) {
// Create a temporary file
- file, err := os.CreateTemp(dir, "temp-*.txt")
+ file, err := os.CreateTemp(dir, fmt.Sprintf("temp-*.%s", fileFormat))
if err != nil {
return "", err
}