laskoviymishka commented on code in PR #2709:
URL: https://github.com/apache/iceberg-go/pull/2709#discussion_r4718892687
##########
table/evaluators.go:
##########
@@ -1451,7 +1451,7 @@ func (m *inclusiveMetricsEval) VisitStartsWith(t
iceberg.BoundTerm, lit iceberg.
v = v[:lenPrefix]
}
- if len(v) > 0 && v < prefix {
+ if v < prefix {
Review Comment:
Could we drop the `len(v) > 0 &&` on the lower-bound check too
([L1436](https://github.com/apache/iceberg-go/blob/fadb72ad46b672ad86cae146733686b50c7b2e35/table/evaluators.go#L1436-L1456))?
`"" > prefix` is never true, so it can't change the result, and neither the
manifest evaluator
([L629](https://github.com/apache/iceberg-go/blob/fadb72ad46b672ad86cae146733686b50c7b2e35/table/evaluators.go#L629-L657))
nor Java's
[`startsWith`](https://github.com/apache/iceberg/blob/2114bf631e49af532d66e2ce148ee49dd1dd1f1f/api/src/main/java/org/apache/iceberg/expressions/InclusiveMetricsEvaluator.java#L388-L428)
has it. Both sides would then read the same.
--
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]