You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Earlier, support for LOG and ROUND scalar functions with two arguments was added in cube-js/arrow-datafusion#135. However, the second argument type was specified as Int32. It allows it to match columns but prevents from matching integer literals.
To Reproduce
Query generated by QuickSight:
SELECT
date_trunc(\'day\', "period") AS period_tg", SUM("clicks") AS clicks_sum", ROUND(CAST(CAST(SUM("clicks") - (MIN(SUM("clicks")) OVER ()) AS FLOAT) / NULLIF(CAST((MAX(SUM("clicks")) OVER ()) - (MIN(SUM("clicks")) OVER ()) AS FLOAT), 0) AS NUMERIC), 3) AS "68c185d7-907c-3bb3-97f2-ec592e580dc0"FROM "public"."revenue"GROUP BY date_trunc(\'day\', "period")ORDER BY date_trunc(\'day\', "period") NULLS FIRSTLIMIT 500
Casting the second argument by doing round(3.142, cast(1 as integer)) works but since the BI tool is generating the query, there no actual control over the second argument.
Expected behavior LOG and ROUND should work with integer literals as the second argument. They are indeed matched as Int64 values, as confirmed by @MazterQyou.
Describe the bug
Earlier, support for
LOG
andROUND
scalar functions with two arguments was added in cube-js/arrow-datafusion#135. However, the second argument type was specified asInt32
. It allows it to match columns but prevents from matching integer literals.To Reproduce
Query generated by QuickSight:
Casting the second argument by doing
round(3.142, cast(1 as integer))
works but since the BI tool is generating the query, there no actual control over the second argument.Expected behavior
LOG
andROUND
should work with integer literals as the second argument. They are indeed matched asInt64
values, as confirmed by @MazterQyou.Version:
1.1.0
Additional context
Slack thread: https://cube-js.slack.com/archives/C01FU5AP9LJ/p1727956303761059
The text was updated successfully, but these errors were encountered: