You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@paimon.apache.org by "yuzelin (via GitHub)" <gi...@apache.org> on 2025/07/10 03:49:03 UTC
[PR] [core][flink] Streaming first plan refactor level0 filtering to avoid that latest-full mode wrong [paimon]
yuzelin opened a new pull request, #5866:
URL: https://github.com/apache/paimon/pull/5866
… that data cannot be read
<!-- Please specify the module before the PR name: [core] ... or [flink] ... -->
### Purpose
<!-- Linking this pull request to the issue -->
Reproduce step:
```
CREATE TABLE test (a INT, b INT) WITH ('deletion-vectors.enabled' = 'true');
INSERT INTO test VALUES (1, 1);
INSERT INTO test VALUES (2, 2);
-- then do compact --
SELECT * FROM test /*+ OPTIONS('scan.mode' = 'latest-full') */
```
Cannot get data because level0 file is skipped and append table only has level0 files. Then if:
```
INSERT INTO test VALUES (3, 3);
```
SELECT result is (3, 3) without full data because StreamScan move to nextPlan to read DELTA data.
<!-- What is the purpose of the change -->
### Tests
<!-- List UT and IT cases to verify this change -->
### API and Format
<!-- Does this change affect API or storage format -->
### Documentation
<!-- Does this change introduce a new feature -->
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core][flink] Streaming first plan refactor level0 filtering to avoid that latest-full mode wrong [paimon]
Posted by "yuzelin (via GitHub)" <gi...@apache.org>.
yuzelin commented on code in PR #5866:
URL: https://github.com/apache/paimon/pull/5866#discussion_r2207075977
##########
paimon-core/src/main/java/org/apache/paimon/table/source/DataTableStreamScan.java:
##########
@@ -204,6 +195,15 @@ private Plan tryFirstPlan() {
return SnapshotNotExistPlan.INSTANCE;
}
+ private boolean skipLevel0() {
+ LookupStrategy lookupStrategy = options.lookupStrategy();
+ if (!lookupStrategy.produceChangelog && lookupStrategy.deletionVector) {
+ // Read level0 data for DELETION VECTOR ONLY mode
Review Comment:
Because there is the same problem for pk table with `'deletion-vectors.enabled' = 'true', 'changelog-producer' = 'none'`. Test is added to `DeletionVectorITCase`.
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core][flink] Streaming first plan refactor level0 filtering to avoid that latest-full mode wrong [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5866:
URL: https://github.com/apache/paimon/pull/5866#discussion_r2199280917
##########
paimon-core/src/main/java/org/apache/paimon/table/source/DataTableStreamScan.java:
##########
@@ -204,6 +195,15 @@ private Plan tryFirstPlan() {
return SnapshotNotExistPlan.INSTANCE;
}
+ private boolean skipLevel0() {
+ LookupStrategy lookupStrategy = options.lookupStrategy();
+ if (!lookupStrategy.produceChangelog && lookupStrategy.deletionVector) {
+ // Read level0 data for DELETION VECTOR ONLY mode
Review Comment:
Why we need to change behavior of pk table with dv?
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core][flink] Streaming first plan refactor level0 filtering to avoid that full mode wrong [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi commented on code in PR #5866:
URL: https://github.com/apache/paimon/pull/5866#discussion_r2212100597
##########
paimon-core/src/main/java/org/apache/paimon/table/source/DataTableStreamScan.java:
##########
@@ -157,7 +157,7 @@ private Plan tryFirstPlan() {
StartingScanner.Result result;
if (scanMode == FILE_MONITOR) {
result = startingScanner.scan(snapshotReader);
- } else if (options.needLookup()) {
+ } else if (skipLevel0()) {
Review Comment:
options.changelogProducer().equals(LOOKUP)
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [core][flink] Streaming first plan refactor level0 filtering to avoid that full mode wrong [paimon]
Posted by "JingsongLi (via GitHub)" <gi...@apache.org>.
JingsongLi merged PR #5866:
URL: https://github.com/apache/paimon/pull/5866
--
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: issues-unsubscribe@paimon.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org