szehon-ho commented on code in PR #10203:
URL: https://github.com/apache/iceberg/pull/10203#discussion_r1643661857
##########
core/src/main/java/org/apache/iceberg/BaseEntriesTable.java:
##########
@@ -192,37 +188,46 @@ public <T> Boolean notNaN(BoundReference<T> ref) {
@Override
public <T> Boolean lt(BoundReference<T> ref, Literal<T> lit) {
- return compareDateFileContent(ref, lit, compareResult -> compareResult
< 0);
+ return ROWS_MIGHT_MATCH;
}
@Override
public <T> Boolean ltEq(BoundReference<T> ref, Literal<T> lit) {
- return compareDateFileContent(ref, lit, compareResult -> compareResult
<= 0);
+ return ROWS_MIGHT_MATCH;
}
@Override
public <T> Boolean gt(BoundReference<T> ref, Literal<T> lit) {
- return compareDateFileContent(ref, lit, compareResult -> compareResult
> 0);
+ return ROWS_MIGHT_MATCH;
}
@Override
public <T> Boolean gtEq(BoundReference<T> ref, Literal<T> lit) {
- return compareDateFileContent(ref, lit, compareResult -> compareResult
>= 0);
+ return ROWS_MIGHT_MATCH;
}
@Override
public <T> Boolean eq(BoundReference<T> ref, Literal<T> lit) {
- return compareDateFileContent(ref, lit, compareResult -> compareResult
== 0);
+ if (fileContent(ref)) {
+ Literal<Integer> intLit = lit.to(Types.IntegerType.get());
+ Integer fileContentId = intLit.value();
+ if (fileContentId == FileContent.DATA.id()) {
+ return manifestContentId == ManifestContent.DATA.id();
+ } else {
Review Comment:
I know it probably wont happen, but how about we make this code handle
future additions.
(ie, add condition else if with fileContentId == FileContent.DELETE.id(),
and then return ROWS_MIGHT_MATCH if neither of these cases. )
--
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]