Closed penberg closed 1 month ago
@penberg time to talk about affinities. https://github.com/penberg/limbo/issues/114 this is due to affinity of values where 79.0 was optimzied as a u8 on disk and then treated as integer on getting a record from a Page. thankfully fix here is simple so I will add it :):
/* If the column has REAL affinity, it may currently be stored as an
** integer. Use OP_RealAffinity to make sure it is really real.
**
** EVIDENCE-OF: R-60985-57662 SQLite will convert the value back to
** floating point when extracting it from the record. */
if( iCol>=0 && pTab->aCol[iCol].affinity==SQLITE_AFF_REAL ){
sqlite3VdbeAddOp1(v, OP_RealAffinity, target);
}
in the future we might want to separate data type and affinity type
The
cross-join
test fails with SQLite because we print out the age column in wrong format: