SQLite

View Ticket
Login
Ticket Hash: e0c2ad1aa8a9c69100ec87a8d28fad5ccf0c97d7
Title: GROUP BY causes unexpected conversion
Status: Fixed Type: Code_Defect
Severity: Minor Priority: Low
Subsystem: Unknown Resolution: Fixed
Last Modified: 2020-03-10 11:51:02
Version Found In: 3.32.0
User Comments:
mrigger added on 2020-03-10 09:33:33:

Consider the following test case:

CREATE TABLE t0(c0 REAL, c1 REAL GENERATED ALWAYS AS (c0));
INSERT INTO t0(c0) VALUES (1);
SELECT * FROM t0 GROUP BY c0; -- expected: 1.0|1.0, actual: 1.0|1
SELECT * FROM t0; -- 1.0|1.0

I would expect the same result for the first and second query; however, the first one unexpectedly converts the value stored in column c1.