You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@paimon.apache.org by lz...@apache.org on 2024/07/15 09:14:41 UTC
(paimon) branch master updated: [core] add default implementation to FileIndexResult and/or operation. (#3750)
This is an automated email from the ASF dual-hosted git repository.
lzljs3620320 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/paimon.git
The following commit(s) were added to refs/heads/master by this push:
new 039926fda [core] add default implementation to FileIndexResult and/or operation. (#3750)
039926fda is described below
commit 039926fdafa4597824dcdb6a2a3331f2927a8409
Author: hang8929201 <43...@users.noreply.github.com>
AuthorDate: Mon Jul 15 17:14:36 2024 +0800
[core] add default implementation to FileIndexResult and/or operation. (#3750)
---
.../org/apache/paimon/fileindex/FileIndexResult.java | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexResult.java b/paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexResult.java
index 0aaaec699..3661a9b59 100644
--- a/paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexResult.java
+++ b/paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexResult.java
@@ -59,7 +59,19 @@ public interface FileIndexResult {
boolean remain();
- FileIndexResult and(FileIndexResult fileIndexResult);
+ default FileIndexResult and(FileIndexResult fileIndexResult) {
+ if (fileIndexResult.remain()) {
+ return this;
+ } else {
+ return SKIP;
+ }
+ }
- FileIndexResult or(FileIndexResult fileIndexResult);
+ default FileIndexResult or(FileIndexResult fileIndexResult) {
+ if (fileIndexResult.remain()) {
+ return REMAIN;
+ } else {
+ return this;
+ }
+ }
}