Opened 13 years ago
#3337 new bug
Query Builder's data sampler doesn't use original dataset
Reported by: | arencambre | Owned by: | jef |
---|---|---|---|
Priority: | minor: annoyance | Milestone: | Version 1.7.0 |
Component: | Vectors | Version: | 1.6.0 |
Keywords: | Cc: | aren@… | |
Must Fix for Release: | No | Platform: | Windows |
Platform Version: | 7 x86 | Awaiting user input: | no |
Description
Suppose you use the Query Builder to filter data on a layer. Now suppose you want to later refine the query, perhaps by adding back some data you previously filtered our.
If I click on a field on the left side and then hit Sample or All under Values, the values are only returned from the filtered dataset, not from the original dataset.
Here's where it's a problem: I have a vector layer with field rte_class with values County Roads, FC Streets, On System Highways, and Toll Roads. I previously filtered the dataset so the SQL where clause says "rte_class" = 'On System Highways'. But I wanted to go back and add another value, but I don't remember what it is. I clicked on rte_class under Fields and hit All under Values, and the only value presented is On System Highways. The only way I got the other three fields back is to clear the filter and start over.
I think that sampled data should come from the original dataset, not the filtered version of the data. I've been debating bug vs. enhancement for this, but I think it's a bug because it precludes using the Query Builder to relax a filter unless I clear the filter totally.
Only after clearing the filter was I able to produce the desired where clause: "rte_class" = 'On System Highways' OR "rte_class" = 'Toll Roads'.