Skip to content

Conversation

puretension
Copy link

@puretension puretension commented Sep 18, 2025

What does this PR do?

Completes the fix for SQL Server integration errors when schemas_collection.enabled: true on Azure SQL Database. Adds missing FK.object_id to SELECT clause and handles None return values in deadlock collection.

Motivation

Issue #20665 reports SQL syntax errors and Python TypeErrors on Azure SQL Database with schemas_collection enabled. While PR #20546 partially fixed this, the main FOREIGN_KEY_QUERY still needs FK.object_id in SELECT clause, and deadlock None handling was never addressed.

Review checklist (to be filled by reviewers)

  • Feature or bugfix MUST have appropriate tests (unit, integration, e2e)
  • Add the qa/skip-qa label if the PR doesn't need to be tested during QA.
  • If you need to backport this PR to another branch, you can add the backport/<branch-name> label to the PR and it will automatically open a backport PR once this one is merged

Keep FK.object_id in GROUP BY clause to fix SQL 8120 error while
maintaining backward compatibility with existing foreign key parsing.

Signed-off-by: puretension <[email protected]>
Copy link

codecov bot commented Sep 18, 2025

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.31%. Comparing base (7b59ac0) to head (4e2e094).
⚠️ Report is 12 commits behind head on master.

Additional details and impacted files
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Remove FK.object_id from GROUP BY to match SELECT fields and
prevent SQL aggregation errors while maintaining proper grouping.

Signed-off-by: puretension <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant