core: apply Real affinity on columns stored as int

Values in sqlite3, as expected, can be stored in different formats to
optimize disk usage. In this case, a 79.0 float will be transformed to a
u8.

sqlite3 deals with this by adding a RealAffinity op after each column
that might need it. Therefore, in this pr we do exactly that :).

Signed-off-by: Pere Diaz Bou <pere-altea@hotmail.com>
This commit is contained in:
Pere Diaz Bou
2024-07-10 21:21:23 +02:00
parent 5b36ca12ad
commit 538d624770
3 changed files with 94 additions and 35 deletions

View File

@@ -68,8 +68,12 @@ do_execsql_test pragma-cache-size {
do_execsql_test cross-join {
select * from users, products limit 1;
} {1|Jamie|Foster|dylan00@example.com|496-522-9493|62375\ Johnson\ Rest\ Suite\ 322|West\ Lauriestad|IL|35865|94|1|hat|79}
} {1|Jamie|Foster|dylan00@example.com|496-522-9493|62375\ Johnson\ Rest\ Suite\ 322|West\ Lauriestad|IL|35865|94|1|hat|79.0}
do_execsql_test cross-join-specific-columns {
select first_name, price from users, products limit 1;
} {Jamie|79}
} {Jamie|79.0}
do_execsql_test realify {
select price from products limit 1;
} {79.0}