Open tschmetzer opened 3 years ago
@tschmetzer does the issue occur setting a "Joined field prefix"? Does the issue occur selecting only the "smod" field and unselecting the "fid" field in the "Fields to add" option?
I think the issue could be related to a typical field name conflict with GeoPackages, since the "Join Layer" has a "fid" field and the GeoPackage layer creation process also adds a "fid" field by default.
@tschmetzer does the issue occur setting a "Joined field prefix"? Does the issue occur selecting only the "smod" field and unselecting the "fid" field in the "Fields to add" option?
I think the issue could be related to a typical field name conflict with GeoPackages, since the "Join Layer" has a "fid" field and the GeoPackage layer creation process also adds a "fid" field by default.
It really seems to be a field name conflict that in my opinion the user needs to be warned of and if confirmed by the user it needs to be overwritten without other attributes being NULLed. What's your opinion?
What is the bug or the crash?
When two layers are processed using the algorithm "Join by location" then the base layer's attribute is assigned the value "NULL"
The problem occurs only when shapefile layers are used as input and a geopackage as output. There seems to be a type conversion problem from shapefile to Geopackage When the Geopackage format was input as well as output the problem wasn't reproducible. Same for pure shapefile conversions or when using a temporal layer.
Steps to reproduce the issue
Select a GPKG as joined layer output
Run the processing. It should finish in 1-2 s.
Observe the results: Input Ouput
Versions
QGIS version 3.20.2-Odense QGIS code revision 9f59a156 Qt version 5.15.2 Python version 3.9.5 GDAL/OGR version 3.3.1 PROJ version 8.1.0 EPSG Registry database version v10.027 (2021-06-17) GEOS version 3.9.1-CAPI-1.14.2 SQLite version 3.35.2 PDAL version 2.3.0 PostgreSQL client version 13.0 SpatiaLite version 5.0.1 QWT version 6.1.3 QScintilla2 version 2.11.5 OS version Windows 10 Version 2009
Active Python plugins GroupStats QuickOSM db_manager MetaSearch processing
Supported QGIS version
New profile
Additional context
No response