apache / apache/paimon

[Bug] Incremental query failing to read changelog when batchScanSkipLevel0 is true and changelog producer is set to 'input'

Open
#6,698 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Java
Stars
3.4k
Forks
1.4k
Avg merge
1d 11h
Merged PRs (30d)
396

Description

### Search before asking

- [x] I searched in the [issues](https://github.com/apache/paimon/issues) and found nothing similar.

### Paimon version

master commit id:e14a8111

### Compute Engine

all

### Minimal reproduce step

paimon table
```
CREATE TABLE T (
a INT,
b INT,
PRIMARY KEY (a) NOT ENFORCED
) WITH (
'changelog-producer' = 'lookup',
'bucket' = '1',
'deletion-vectors.enabled' = 'true'
)

INSERT INTO T VALUES (1, 2), (2, 2), (3, 3);

SELECT * FROM T /*+ OPTIONS( 'scan.mode' = 'incremental', 'incremental-between' = '0,1'*/;

```
The result is EMPTY

### What doesn't meet your expectations?

[+I[1, 2], +I[2, 2], +I[3, 3]]

### Anything else?

_No response_

### Are you willing to submit a PR?

- [x] I'm willing to submit a PR!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the minimal Paimon table reproduction and the incremental scan query, comparing the changelog-producer and batchScanSkipLevel0 settings described in the title and body. Trace why the incremental query returns an empty result; done means it returns [+I[1, 2], +I[2, 2], +I[3, 3]] for the reproduction.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, sql
Domain
data-engineering, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.