Bug report #10709

Bigint (qlonglong) support for expressions

Added by Michael Douchin over 5 years ago. Updated 9 months ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Expressions
Affected QGIS version:2.2.0 Regression?:No
Operating System: Easy fix?:No
Pull Request or Patch supplied:No Resolution:end of life
Crashes QGIS or corrupts data:No Copied to github as #:19102

Description

Dealing with 2 geometryless tables

When join fields are bigint, children are not displayed in the subform if the integer are too long, but you can still add a new one.
Only children with integer values under the bigint are displayed.

See attached images :

Table definition :

CREATE TABLE avig_adresse."Pere" 
(
  id_pere bigint,
  pere text
)
WITH (
  OIDS=FALSE
);

CREATE TABLE avig_adresse."Enfant" 
(
  id_enfant integer,
  id_pere bigint,
  enfant text
)
WITH (
  OIDS=FALSE
);




relation_bigint_1.png (221 KB) Michael Douchin, 2014-06-25 01:44 AM

relation_bigint_2.png (147 KB) Michael Douchin, 2014-06-25 01:44 AM

relation_bigint_3.png (239 KB) Michael Douchin, 2014-06-25 01:44 AM

relation_bigint_4.png (236 KB) Michael Douchin, 2014-06-25 01:44 AM

relation_bigint_5.png (33.3 KB) Michael Douchin, 2014-06-25 02:53 AM

History

#1 Updated by Matthias Kuhn over 5 years ago

Can you please perform a quick test:

Open the field calculator on the Enfant layer and create a new column based on the following expression

id_pere=840070000002

#2 Updated by Michael Douchin over 5 years ago

The reporter did this :

newcol : smallint
newcol2 : text

I except you need more than this ?

  • Should he create a newcol3 in integer format (not bigint) ?
  • Should he try to change the relation and use the newcolX instead of the bigint id ?

#3 Updated by Matthias Kuhn over 5 years ago

  • Category changed from Relations to Expressions

I tracked it down to an error in the expression engine. It internally handles bigint as double, what causes some problems under certain situations.

I proposed a workaround here https://github.com/qgis/QGIS/pull/1488 (closed unmerged)

#4 Updated by Michael Douchin over 5 years ago

  • Category changed from Expressions to Relations

Hi

It seems your workaround has not been merge. Do you think there will be a solution before 2.4 ?
Thanks for your help

#5 Updated by Matthias Kuhn over 5 years ago

  • Assignee deleted (Matthias Kuhn)
  • Category changed from Relations to Expressions

Yes, a discussion revealed that it is too risky to introduce this change so short before the release.

It's quite hard to fix the current situation and I miss some information to judge possible solutions.

#6 Updated by Michael Douchin over 5 years ago

  • Target version changed from Version 2.4 to Future Release - High Priority

Ok, thanks for your help anyway ! I change the target version .

#7 Updated by Matthias Kuhn over 5 years ago

  • Subject changed from Relation - Hidden children if parent id are bigint to Bigint (qlonglong) support for expressions

#8 Updated by Michael Douchin over 5 years ago

While waiting for the fix, the users can use text fields instead of bigint as a workaround to do the joins.

#9 Updated by Giovanni Manghi over 2 years ago

  • Regression? set to No
  • Easy fix? set to No

#10 Updated by Giovanni Manghi 9 months ago

  • Resolution set to end of life
  • Status changed from Open to Closed

Also available in: Atom PDF