Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Added FixedIn version for issues fixed in the 2.25 YB version #2214

Merged
merged 22 commits into from
Jan 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/issue-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
136 changes: 88 additions & 48 deletions migtests/tests/analyze-schema/expected_issues.json

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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;"
Expand All @@ -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",
Expand Down Expand Up @@ -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
Expand All @@ -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",
Expand All @@ -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": [
Expand All @@ -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"
}
}
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand Down Expand Up @@ -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",
Expand All @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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.",
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion yb-voyager/cmd/assessMigrationCommand.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down Expand Up @@ -1247,6 +1248,7 @@ func fetchUnsupportedPlPgSQLObjects(schemaAnalysisReport utils.SchemaReport) []U
DisplayDDL: true,
DocsLink: docsLink,
Objects: objects,
MinimumVersionsFixedIn: minVersionsFixedIn,
}
unsupportedPlpgSqlObjects = append(unsupportedPlpgSqlObjects, feature)
}
Expand Down
3 changes: 2 additions & 1 deletion yb-voyager/cmd/importDataFileBatchProducer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
}
Expand Down
36 changes: 20 additions & 16 deletions yb-voyager/src/query/queryissue/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you provide context behind this change to have separate issues? Pls add to PR description as well.

Copy link
Contributor Author

@priyanshi-yb priyanshi-yb Jan 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah will add it to the PR description, but the reason for separating it out is that any_value is a PG16 feature and range_agg.. functions are PG15 ones and are supported in 2.25
so we have to add the version for range ones only. So I thought it would be better to separate them now.

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"
Expand Down Expand Up @@ -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
Expand Down
Loading