pg returns the result of the COUT/MAX as String, because of potential precision loss.
While other backends can return Int there (and losing some digits if the result does not fit the Int range)
It is useful to have the expression of type Col s Int rather than Col s String e.g. comparison on strings is different than on ints.
Potential solution:
drop the appropriate type in the Expr AST
add CAST expression (extend Expr)
implement count, max_ and other related functions per backend
pg returns the result of the COUT/MAX as String, because of potential precision loss. While other backends can return
Int
there (and losing some digits if the result does not fit theInt
range)It is useful to have the expression of type
Col s Int
rather thanCol s String
e.g. comparison on strings is different than on ints.Potential solution: