[Bug] java.lang.IllegalArgumentException: Row arity: 3, but serializer arity: 4
- 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
v1.2.0
### Compute Engine
flink 1.19.2
### Minimal reproduce step
Please add the following to CatalogTableITCase.java
@Test
public void testBinlogTableStreamReadWithProjection() throws Exception {
sql(
"CREATE TABLE T (a INT, b INT, c STRING, primary key (a) NOT ENFORCED) with ('changelog-producer' = 'lookup', 'bucket' = '2')");
sql("CREATE TABLE T2 (b INT)");
CloseableIterator insert =
streamSqlIter(
"INSERT INTO T2 SELECT case when rowkind = '+I' then b[1] else b[2] end as b FROM T$binlog /*+ OPTIONS('scan.mode' = 'latest') */ where a[1] > 0");
BlockingIterator select = streamSqlBlockIter("SELECT * FROM T2");
sql("INSERT INTO T VALUES (1, 1, 'a')");
sql("INSERT INTO T VALUES (1, 2, 'b')");
assertThat(select.collect(2)).containsExactlyInAnyOrder(Row.of(1), Row.of(2));
select.close();
insert.close();
}
### What doesn't meet your expectations?
When reading the $binlog table, the serializer is incorrect, which prevents the data from being read out.
### Anything else?
solution:
BinlogTable.java:L134
replace wrapped.rowType() with wrappedReadType
### 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
Add the reported regression test to CatalogTableITCase.java using the provided reproduction, then inspect BinlogTable.java around line 134. Verify the serializer uses the intended read type and run the relevant CatalogTableITCase tests; done means the projection reads successfully and returns Row.of(1) and Row.of(2).
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- data-engineering, databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100