Use an explicit list of "placeholder" tables instead of a magical substring
Nobody has claimed this yet.
- Dominant language
- Clojure
- Stars
- 23
- Forks
- 4
- PR merge metrics
- No merged PRs in 30d
Description
When analyzing Metabase queries with references to logical views (aka models), Macaw is passed a query with "sentinel" names in place of actual tables. In order for find-replace to work correctly, [we treat such qualifiers as if they were missing](https://github.com/metabase/macaw/pull/43), so that we can cascade down to the entry qualified by the actual table.
This trick currently relies on Metabase's naming convention, and could have false positives, or break if this convention changes.
A more robust solution would be to take a set of placeholder names to be treated like this. Checking membership in this set should also be faster than searching for substrings too.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Trace the qualifier handling used when analyzing queries with logical views, and locate the current substring-based placeholder check. Replace that convention-dependent check with membership in an explicit set of placeholder names, then verify that cascading still reaches the entry qualified by the actual table and that unrelated qualifiers are unaffected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- clojure
- Domain
- databases
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100