AltimateAI / AltimateAI/vscode-dbt-power-user
"Execute Query" should allow for a no-limit option that does not run as a subquery
- Lenguaje dominante
- JavaScript
- Estrellas
- 585
- Forks
- 121
- Merge medio
- 5 d 39 min
- PR fusionados (30 d)
- 4
Descripción
### Describe the feature
"Execute Query" forces a limit and runs the query as
```
select *
from {
-- the sql
}
limit 500
```
This has the effect that it can change the behavior of the inner sql if the inner sql has ORDER BY, as ORDER BY is guaranteed to apply only to the SELECT statement it's attached to, and has no guarantee that it will be preserved accross subqueries. So if I have a query like
```
select *
from foo
order by bar
```
and I execute it, the resulting order I get in the results tab will not necessarily be ordered by bar, nor will it be ordered in the same fashion every time, nor will it necessarily give me the same limitted count of rows every time. It lead to a lot of confusion when debugging queries.
It would be super super useful to allow the limit of rows to be set to 0 / nonexistent, and when that happens remove the subquery template and just run the query as is.
### Describe alternatives you've considered
_No response_
### Who will benefit?
_No response_
### Are you willing to submit PR?
- [x] Yes I am willing to submit a PR!
Guía de contribución
Evaluación
Este issue todavía no se ha evaluado.