{"errors":[{"message":"**Float cannot represent non numeric value: \"2020-06-25T14:00:00.000\**"","locations":[{"line":6,"column":7}],"path":["cube",0,"generalLedger_Income","minDate"]}],"data":{"cube":[{"generalLedger_Income":{"minDate":null,"__typename":"GeneralLedger_IncomeMembers"},"__typename":"Result"}]}}
Expected behavior
Min and Max should be able to be used on Date fields as well
Screenshots
If applicable, add screenshots to help explain your problem.
Minimally reproducible Cube Schema
In case your bug report is data modelling related please put your minimally reproducible Cube Schema here.
You can use selects without tables in order to achieve that as follows.
cube(`generalLedger_Income`, {
sql: `
select now() as created_at
UNION ALL
select now() as created_at
`,
measures: {
minDate: {
sql: `created_at`,
type: `min`,
},
},
});
Describe the bug When using a
min
measure type on a DateTime field there is a casting error when querying via GraphQLTo Reproduce
Have a Cube with a min measure type on a DateTime field (we are using PostGres):
Query for the field using GraphQL:
Expected behavior Min and Max should be able to be used on Date fields as well
Screenshots If applicable, add screenshots to help explain your problem.
Minimally reproducible Cube Schema In case your bug report is data modelling related please put your minimally reproducible Cube Schema here. You can use selects without tables in order to achieve that as follows.
Version: 0.31.11
Additional context