-
Notifications
You must be signed in to change notification settings - Fork 1k
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] Enable file index for DV table #4310
Conversation
@@ -121,10 +134,33 @@ protected boolean filterByStats(ManifestEntry entry) { | |||
} | |||
|
|||
return filter.test( |
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.
Add "long schemaId = entry.file().schemaId();" in KeyValueFileStoreScan#filterByStats, and then use schemaId in KeyValueFileStoreScan#filterByStats and KeyValueFileStoreScan#testFileIndex.
paimon-core/src/main/java/org/apache/paimon/operation/KeyValueFileStoreScan.java
Outdated
Show resolved
Hide resolved
new FileIndexPredicate(embeddedIndexBytes, dataRowType)) { | ||
return predicate.testPredicate(dataPredicate); | ||
} catch (IOException e) { | ||
throw new RuntimeException("Exception happens while checking predicate.", e); |
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.
Exception happens while checking fileIndex predicate.
|
||
private boolean testFileIndex(@Nullable byte[] embeddedIndexBytes, ManifestEntry entry) { | ||
if (embeddedIndexBytes == null) { | ||
return true; |
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.
If fileIndex does not exist in embeddedIndex but in a separate file, what logic of filter by FileIndex in pk table with DV?
@@ -238,7 +238,8 @@ private KeyValueFileStoreScan newScan(boolean forWrite) { | |||
options.scanManifestParallelism(), | |||
options.deletionVectorsEnabled(), | |||
options.mergeEngine(), | |||
options.changelogProducer()); | |||
options.changelogProducer(), | |||
options.fileIndexReadEnabled() && options.deletionVectorsEnabled()); |
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.
Add "File index support Append Only tables and pk table with DV" in fileIndex doc
ee6f76f
to
5463266
Compare
5463266
to
2e62702
Compare
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
Purpose
File index is only support Append Only tables yet. But it is able to support primary-key table like Deletion Vector Table.
This pull request, enable
File Index
in DV table.Tests
API and Format
Documentation