Inputs within other expressions not parsed by SQLair
- Dominant language
- Go
- Stars
- 19
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
SQLair does not parse input expressions nested within other parsed expressions. This can cause issues with input expressions in functions that are saved in output expressions or sub expressions that are inserted in INSERT statements.
For example, when selecting a value directly into an insert the `$M.val` below will not be parsed:
```sql
INSERT INTO t
(col1, col2)
VALUES
(&M.col1, SELECT col3 FROM s WHERE x = $M.val)
```
Or, when selecting a function into an output, again, the `$M.val` will not be parsed.
```sql
SELECT MyFunc($M.val) AS &M.out FROM t
```
This can be fixed by parsing these sub-expressions recursively.
Contributor guide
Research direction
No source files or tests are named. Reproduce the two SQL examples, then locate the expression-parsing entry point and trace how nested expressions are handled; done means the nested $M.val inputs are parsed in both INSERT and function-output cases, with regression coverage for these examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, sql
- Domain
- database
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 50/100