Conversation
594dfc9 to
05cf887
Compare
05cf887 to
d010114
Compare
d010114 to
979ddae
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Dynamic regexes do not escape metacharacters in encoded type paths, potentially dropping valid inference results.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Optimizes shared type-inference matching and join ordering.
Changes:
- Refactors missing type-argument checks.
- Narrows relevant access targets.
- Uses regex-based path prefix selection.
| File | Description |
|---|---|
shared/typeinference/codeql/typeinference/internal/TypeInference.qll |
Optimizes type matching and path resolution. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
dfb9e08 to
b18b617
Compare
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The regex implementation loses valid results when prefix candidates overlap.
Get a fresh assessment by requesting another Copilot review.
Review effort: Balanced
Findings: 1
Open (1)
Resolved since last review (1)
b18b617 to
3720a8c
Compare
|
The general solution is overly complicated. Everything is simpler if you decompose the calculation into its two parts: the inverse append and the join with the fanout predicate. First project Then do the inverse append: Then join: This should have the same performance characteristic as the regex-based version, since the regex version also effectively performs the projected CP of |
Right, only problem is that this doesn't work unless we bind |
Granted, I haven't looked at your actual use-case, but I don't see how that makes a difference. Constructing the regex is essentially equivalent to the projection to the prefix column, so if your complex solution works, then the simple ought to as well. |
|
Another way to phrase the simple solution is as follows: You have a big CP because the join-orderer needs to pick |
|
Turns out that the effect of the inverse-append changes were in fact not helping at all, and that the actual performance improvements were the other changes, so I have reverted. |


This PR makes a few performance improvements in the shared type inference library.