Commit 59db5202 authored by Carlos Garnacho's avatar Carlos Garnacho

libtracker-data: Do not cast doubles to strings

Letting Sqlite handle the conversion may result in precision loss,
weird ordering, and possibly other side results.
parent 69c3cf70
......@@ -1369,8 +1369,9 @@ convert_expression_to_string (TrackerSparql *sparql,
switch (type) {
case TRACKER_PROPERTY_TYPE_STRING:
case TRACKER_PROPERTY_TYPE_INTEGER:
/* Nothing to convert. Do not use CAST to convert integers to
* strings as this breaks use of index when sorting by variable
case TRACKER_PROPERTY_TYPE_DOUBLE:
/* Nothing to convert. Do not use CAST to convert integer/double to
* to string as this breaks use of index when sorting by variable
* introduced in select expression
*/
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment