Cast error in mapd


this is my query:
SELECT coalesce(sum(“mSO”.m_margin), 0) AS “SO.margin” FROM “mSO” LIMIT 501;

mSO is table
m_margin is column with NUMERIC type

if i execute this query in terminal its giving me error as “Exception: Cast between different DECIMAL scales not supported”


you are asking an implicit cast because of the 0 literal; you have to change the query this way

SELECT coalesce(sum(“mSO”.m_margin), 0.0) AS “SO.margin” FROM “mSO” LIMIT 501;

maybe in the next release this will be fixed


okey thank you for your time