Bug report #19330

Provider Feature Filter Query Builder - CHANGES ATTRIBUTE VALUES

Added by Emma Gause about 2 years ago. Updated over 1 year ago.

Status:Closed
Priority:High
Assignee:-
Category:Vectors
Affected QGIS version:3.3(master) Regression?:Yes
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:not reproducable
Crashes QGIS or corrupts data:No Copied to github as #:27158

Description

Using QGIS 3.2: I put a single query in the Provider Feature Filter to get a subset of my data. Data was formatted as number with decimals. Query was "Field_Name" >=80. After applying the filter, the values in my attribute table for this field were changed. Originally values in this field ranged from 0.0... to 99.9... (it was a percentile), but after applying the query, many of the fields were changed and included values up to 8000+ and "ERROR" and "Inf." The same data and the same query in QGIS 3.0 worked as expected and simply filtered the data to include values of 80+

Screen Shot 2018-07-03 at 2.26.06 PM.png - Changed Data After Query (32.1 KB) Emma Gause, 2018-07-04 12:54 AM

1 - fid and Filter.png - Primary key field name is "fid" (69.6 KB) Olcay Ebcin, 2018-07-27 05:35 PM

2 - feat_id and Filter.png - Primary key field name is "feat_id" (69.4 KB) Olcay Ebcin, 2018-07-27 05:35 PM

3 - feat_id and No Filter.png - Primary key field name is "feat_id" (59.4 KB) Olcay Ebcin, 2018-07-27 05:35 PM

test_data.gpkg (380 KB) Olcay Ebcin, 2018-10-02 08:51 PM

History

#1 Updated by Giovanni Manghi about 2 years ago

  • Status changed from Open to Feedback

Are the data really corrupted or is just a visualization problem within QGIS?

#2 Updated by Emma Gause about 2 years ago

Giovanni Manghi wrote:

Are the data really corrupted or is just a visualization problem within QGIS?

Hello,
After the query is applied, the data in the attribute table is changed. However, if you remove the query then the data goes back to its original values.
This does not happen in QGIS 3.0 - I tried the same query with the same data and it worked just fine.

Best,
Emma

#3 Updated by Olcay Ebcin about 2 years ago

Hi,
I have exactly the same problem in QGIS 3.2
I attached 3 screenshots for the same GEOPACKAGE FEATURE which is "Sewer Node".
If I use "fid" name as Primary Key field, then I have no problem with or Without Filter both in labeling and feature attribute. (find screenshot 1.png)
If I use different name for Primary Key like "feat_id" and use Filter, you will see that there is a problem both in labeling and feature attributes. (find screenshot 2.png)
If I dont use a Filter, then I have no problem whatever the Primary Key name is. (find screenshot 3.png)

in QGIS 3.0 there is no such problem. Also, there is no problem in postgis database.

Regards,
Olcay

#4 Updated by Giovanni Manghi about 2 years ago

  • Crashes QGIS or corrupts data changed from Yes to No
  • Category changed from Expressions to Vectors
  • Status changed from Feedback to Open
  • Regression? changed from No to Yes

#5 Updated by Olcay Ebcin about 2 years ago

Hi,
Is anybody working on this issue?
Problem still exists.

#6 Updated by Nyall Dawson almost 2 years ago

  • Status changed from Open to Feedback

Can you share the project/data? It's not possible to reproduce this without it.

#7 Updated by Olcay Ebcin almost 2 years ago

Dear Nyall,
Please find attached geopackage file.
if you filter features as row_status=1 and identify or label features,
you will see the difference.

#8 Updated by Giovanni Manghi almost 2 years ago

  • Subject changed from V3.2: Provider Feature Filter Query Builder - CHANGES ATTRIBUTE VALUES to Provider Feature Filter Query Builder - CHANGES ATTRIBUTE VALUES
  • Affected QGIS version changed from 3.2 to 3.3(master)
  • Operating System deleted (Mac OSX)

Olcay Ebcin wrote:

Dear Nyall,
Please find attached geopackage file.
if you filter features as row_status=1 and identify or label features,
you will see the difference.

yeah, applying this filter on the provided datasource makes the attributes change in a very strange (and very wrong) way...
Tested also on master/linux.

#9 Updated by Nyall Dawson over 1 year ago

  • Status changed from Feedback to Open

#10 Updated by Nyall Dawson over 1 year ago

  • Status changed from Open to Feedback

I cannot reproduce. Can someone share a screencast demonstrating this?

#11 Updated by Giovanni Manghi over 1 year ago

  • Status changed from Feedback to Closed
  • Resolution set to not reproducable

This does not seems reproducable anymore on 3.6 at least, please reopen if necessary.

Also available in: Atom PDF