AltimateAI / AltimateAI/vscode-dbt-power-user

"Execute Query" should allow for a no-limit option that does not run as a subquery

オープン
#1,454 コメント 1 件 リアクション 1 件 担当者 0 名 GitHub で見る
enhancement
主要言語
JavaScript
スター
585
フォーク
121
平均マージ
5日 39分
マージ済み PR(30日)
4

説明

### 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!

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。