From 1652510febaada83a2c9af23428b05e17b47e2d1 Mon Sep 17 00:00:00 2001 From: Matt Beanland Date: Fri, 21 Aug 2026 21:22:45 +0930 Subject: [PATCH] fix: round to no decimal places by default, over numeric so round/2 resolves --- lib/expr.ex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/expr.ex b/lib/expr.ex index 4f86c90..5676682 100644 --- a/lib/expr.ex +++ b/lib/expr.ex @@ -2453,15 +2453,15 @@ defmodule AshSql.Expr do acc, _type ) do - precision = Enum.at(rest, 0) || 1 + precision = Enum.at(rest, 0) || 0 frag = %Fragment{ embedded?: pred_embedded?, arguments: [ - raw: "ROUND(", + raw: "ROUND((", expr: num, - raw: ", ", + raw: ")::numeric, ", expr: precision, raw: ")" ]