-
Notifications
You must be signed in to change notification settings - Fork 998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[core] File index interface and file format. #3068
Conversation
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexPredicateTester.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexFunctionVisitor.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexPredicateUtil.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexPredicateUtil.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/ObjectToBytesVisitor.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexFile.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexFile.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexFile.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexFile.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexFile.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexFile.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexPredicate.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexPredicate.java
Outdated
Show resolved
Hide resolved
paimon-common/src/main/java/org/apache/paimon/fileindex/FileIndexReader.java
Outdated
Show resolved
Hide resolved
// writeColumnSize | ||
dataOutputStream.writeInt(bodyInfo.size()); | ||
// writeColumnInfo, offset = headLength | ||
for (Map.Entry<String, Pair<Integer, Integer>> entry : bodyInfo.entrySet()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we sort the key when write and use an algorithm (e.g. binary search) to speed up the search when read
in case of the large number of keys
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We must
read all head columns and put them into a hashmap not an array list, so we don't need to sort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
+1 |
Related to PIP-17 (https://cwiki.apache.org/confluence/display/PAIMON/PIP-17%3A+Introduce+secondary+column+index)
index file format:
REDUNDANT field for compatibility of next version.
var bytes (head) = bytes length + real bytes
var bytes (body) = column bytes + column bytes + ...