code completion: completion does not work for the correct SQL request
- Dominant language
- Java
- Stars
- 51.8k
- Forks
- 4.4k
- Avg merge
- 3d 13h
- Merged PRs (30d)
- 183
Description
### Description
I have the following request for my database (database schema will be attached below):
```sql
-- Напишите запрос, который покажет распределение активных смен по районам: название района, количество активных такси в нем, и список улиц, на которых они находятся (в виде строки через запятую).
select
d.district_name,
COUNT(distinct sh.shift_id) as active_taxi_count,
string_agg(distinct case when sh.shift_id is not null then s.street_name end, ',') as street_list
from
district d
left join street s on
d.district_name = s.district_name
left join shift sh on
s.street_id = sh.street_id
and sh.shift_end is null
group by
d.district_name;
```
For which DBeaver doesn't give correct auto completion.
### DBeaver Version
DBeaver community 25.2.5.202511161745
### Operating System
Microsoft Windows 11 Pro 25H2
### Database and driver
PostgreSQL 15.14
PostgreSQL JDBC Driver 42.7.2
### Steps to reproduce
1. open this database
2. run SQL editor and open the attached script
3. try to use ctrl+space to get context help
expected result: auto completion should work correctly
actual result: auto completion works incorrectly, always suggests SQL's reserved words, but not tables and columns of my DB.
### Additional context
My database script attached:
[base.sql](https://github.com/user-attachments/files/23815625/base.sql)
Additional info:
It theams that the following aggrigate function expression, with the filter, triggers the problem:
`string_agg(distinct case when sh.shift_id is not null then s.street_name end, ',') as street_list`
Contributor guide
Assessment
This issue has not been assessed yet.