Closed saulshanabrook closed 5 years ago
cc @xmnlab
the problem probably is related to the mapd dtype map:
dtypes = {
'BIGINT': dt.int64,
'BOOLEAN': dt.Boolean,
'BOOL': dt.Boolean,
'CHAR': dt.string,
'DATE': dt.date,
'DECIMAL': dt.float64,
'DOUBLE': dt.float64,
'INT': dt.int32,
'INTEGER': dt.int32,
'FLOAT': dt.float32,
'NULL': dt.Null,
'NUMERIC': dt.float64,
'REAL': dt.float32,
'SMALLINT': dt.int16,
'STR': dt.string,
'TEXT': dt.string,
'TIME': dt.time,
'TIMESTAMP': dt.timestamp,
'VARCHAR': dt.string,
}
I will take a look into that.
thanks for reporting that @saulshanabrook !
For using
floor
with omnisci, sometimes we need to cast literals tofloat
in omnisci, see https://github.com/omnisci/mapd-core/issues/305#issuecomment-450295257However I can figure out how to get ibis to produce SQL like
CAST(-124.39000000000038 AS FLOAT)
.If I use
ibis.literal(x_min, 'float32').cast('float64')
I getCAST(-124.39000000000038 AS NUMERIC)
.And if I use the opposite
ibis.literal(x_min, 'float64').cast('float32')
I getCAST(-124.39000000000038 AS REAL)
.Is it possible to change how OmniSci does the casting?