The fix skips nodes where type === "column_ref", since those aren't table references - #42821
Conversation
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
There was a problem hiding this comment.
Pull request overview
Fixes platform compatibility detection for SQL policies by preventing table-alias column references (AST column_ref nodes) from being misidentified as table names during table extraction.
Changes:
- Update SQL AST traversal to skip nodes where
type === "column_ref"when collectingnode.table. - Add a changelog entry describing the user-visible fix.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/utilities/sql_tools.ts | Avoids treating column_ref.table (often a table alias like m/d) as an actual table reference when parsing tables for compatibility checks. |
| changes/40117-fix-sql-table-alias-platform-detection | Documents the bugfix for release notes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
WalkthroughThis change fixes SQL query analysis to correctly identify table platforms when table aliases are used. Previously, the 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #42821 +/- ##
=======================================
Coverage 66.81% 66.81%
=======================================
Files 2541 2541
Lines 203971 203971
Branches 9164 9164
=======================================
Hits 136282 136282
Misses 55344 55344
Partials 12345 12345
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review to trigger a review and subscribe this PR to future pushes, or @claude review once for a one-time review.
Tip: disable this comment in your organization's Code Review settings.
|
@sgress454 Can you review since you're familiar with the SQL parser. |
sure but what's with this PR title 😆 |
Related issue: Resolves #40117
Fix:

Checklist for submitter
If some of the following don't apply, delete the relevant line.
changes/,orbit/changes/oree/fleetd-chrome/changes.Testing
Summary by CodeRabbit
FROM mounts m).