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

MINOR: Fix Table constraint relationships for SoftDeleted entities. #19129

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1138,7 +1138,7 @@ private void validateTableConstraints(Table table) {
String toParent = FullyQualifiedName.getParentFQN(column);
String columnName = FullyQualifiedName.getColumnName(column);
try {
Table toTable = findByName(toParent, NON_DELETED);
Table toTable = findByName(toParent, ALL);
validateColumn(toTable, columnName);
} catch (EntityNotFoundException e) {
throw new EntitySpecViolationException("Table not found: " + toParent);
Expand Down Expand Up @@ -1232,8 +1232,7 @@ private void addConstraintRelationship(Table table, List<TableConstraint> constr
for (String column : constraint.getReferredColumns()) {
String toParent = FullyQualifiedName.getParentFQN(column);
try {
EntityReference toTable =
Entity.getEntityReferenceByName(TABLE, toParent, NON_DELETED);
EntityReference toTable = Entity.getEntityReferenceByName(TABLE, toParent, ALL);
addRelationship(
table.getId(), toTable.getId(), TABLE, TABLE, Relationship.RELATED_TO);
} catch (EntityNotFoundException e) {
Expand Down
Loading