harshilv17 commented on issue #18988: URL: https://github.com/apache/iceberg/issues/18988#issuecomment-7417662280
I'd like to work on this. Plan: when a decimal or string literal is bound to a decimal column, rescale it to the column's scale if that is exact (`setScale(scale, RoundingMode.UNNECESSARY)`), so `100.0` binds as `100.00` and bucket projection, manifest pruning and the `IN` set all see the column's scale. That also fixes `BoundSetPredicate.test` / `Evaluator.in`, since the set then holds values at the same scale as the data. The open question is a literal that can't be rescaled exactly, such as `100.005` on `decimal(9,2)`: it can never equal a stored value, so I'd keep today's behavior for it rather than round it (rounding would make `= 100.005` match `100.01`). Tests would cover `eq`/`in` binding, bucket projection and the evaluator. Does that approach sound right? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
