oniani1
6e580bffbd
fix(studio): respect enabled prop in index advisor query hook ( #44588 )
...
Fixes #44586
The `enabled` field in `useGetIndexAdvisorResult` had an OR branch that
bypassed the `enabled` prop for queries starting with `with
pgrst_source`. This meant the query could fire even when `enabled:
false` was passed (e.g. when the index_advisor extension isn't installed
or the result is already prefetched).
Restructures the logic to match the sibling hook in
`retrieve-index-from-select-query.ts`, which correctly ANDs `enabled`
with all conditions using an extracted `isValidQueryForIndexing`
variable.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved query validation in index advisor to more reliably handle SQL
query normalization and ensure consistent query processing.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-07 14:18:15 +00:00
..
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-06 18:02:11 +09:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-07 14:18:15 +00:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-06 09:52:43 -04:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-06 13:24:59 -03:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 13:04:49 +00:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-07 13:16:19 +01:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-06 09:57:08 -04:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2024-07-04 14:48:10 +08:00
2026-01-22 11:17:49 -05:00
2026-03-16 11:22:30 +01:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00