Github user mgaido91 commented on the issue: https://github.com/apache/spark/pull/22494 oh, I see now the problem. And it is much bigger than I thought, sorry. Here we were returning a negative scale for `1e6` (it happens in the `AstBuilder`, as we build a BigDecimal from it) also before the change in #20023. But before we had a very high (unneeded) precision for `1000`, which "fixed" the issue with the negative scale. This means that we were lucky in that specific query. If you try, for instance, `select 26393499451 / 1000e6`, then this fails also with your fix and before #20023. So this is not a solution either, I think.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org