You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
BLOOB
S BLOB SUB_TYPE 1
-----------------------------
table
chair
chair
bed
table
bed
bed
chair
The query "select count(s), s from bloob group by s" returns:
1 table
2 chair
1 bed
1 table
2 bed
1 chair
That's pretty weird :-)
IMO, GROUP BY ought to work, or not to work, or throw an error... but not work on *some* equal values because they happen to live in adjacent rows.
Do those rows share the BLOB ID, maybe?
The text was updated successfully, but these errors were encountered:
a) How can it be that adjacent rows, if equal, are grouped together at all?
b) Can this be fixed, in the sense that they are no longer grouped together? IMO the current behaviour is the worst thinkable: an incomplete grouping that depends on the physical table order.
Explanation is quite simple. GROUP BY compares two subsequent (priorly ordered) values to being same or distinct, using the generic comparison routine which handles blobs correctly. But the prior ordering is incorrect, because it's based on BLOB IDs and in this case they correspond to DBKEYs, as blobs were created sequentially, along with new records added. But generally, the result would be unpredictable.
OK, that's clear. I still think this should be fixed (in the sense that no grouping at all takes place on BLOBs, rather than disjunct grouping), but that's up to you guys.
For the time being, I've documented this phenomenon.
Submitted by: @paulvink
Duplicates CORE859
Given this table:
BLOOB
S BLOB SUB_TYPE 1
-----------------------------
table
chair
chair
bed
table
bed
bed
chair
The query "select count(s), s from bloob group by s" returns:
1 table
2 chair
1 bed
1 table
2 bed
1 chair
That's pretty weird :-)
IMO, GROUP BY ought to work, or not to work, or throw an error... but not work on *some* equal values because they happen to live in adjacent rows.
Do those rows share the BLOB ID, maybe?
The text was updated successfully, but these errors were encountered: