asmuth / clip

Create charts from the command line
https://clip-lang.org
Apache License 2.0
5.14k stars 386 forks source link

SValues from mysql backend always created as strings #230

Closed jacksonh closed 5 years ago

jacksonh commented 9 years ago

It looks like in mysqltableref.cc all of the SValue's created in MySQLTableRef::executeScan are strings, so the underlying backend type data is lost.

I ran into this when my mysql DATETIME columns couldn't be used in a GROUP OVER TIMEWINDOW, because SValue::getTimestamp is invoked on the data, which was created as a string.

I've started on a patch to create typed SValues based on the column type, but just want to make sure this is something you'd accept (rather than maybe changing SValue::getTimestamp to attempt to parse the string data into a timestamp.