Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Warn when selection only includes static data (#7758)
### What Based on top of: - #7754 - Will need rebase after merging ^ This tries to alleviates a possible footgun where a user creates what appears to be a valid view expression but it only includes static data. In these cases the results of `.select()` won't produce any data since there are no row-providing columns. There are many possible ways to end up in this state but the logic here should not be too likely for false-warnings while producing a reasonable degree of user safety. If the user: - Writes a content expression that only matches static content - AND writes a select statement that queries static data - AND does not call `using_index_values(...)` Then we will produce a warning. The most likely false positive where this would introduce a spurious warning would be a user wanting to query for a mixture of static and non-static data in a circumstance where sometimes none of the non-static data is logged and the user expects to (correctly) get no rows in this case. However, these circumstances generally imply a more advanced user that could then work around then with a mixed query + join anyways. Future work: - #7759
- Loading branch information