Search before asking
Fluss version
0.9.0 (latest release)
Please describe the bug 🐞
FlussPartitionReader.rowType uses full table schema, but scan returns projected rows. FlussAsSparkRow dispatches getLong, getBinary, getStruct, getArray, and copy based on rowType.getTypeAt(ordinal) - when projection shifts ordinals, the wrong type is looked up. Affects FlussAppendPartitionReader and FlussUpsertPartitionReader.
Solution
Override convertToSparkRow row type in subclasses - project(projection) for append, project(projectionWithPks) for upsert.
Are you willing to submit a PR?
Search before asking
Fluss version
0.9.0 (latest release)
Please describe the bug 🐞
FlussPartitionReader.rowType uses full table schema, but scan returns projected rows. FlussAsSparkRow dispatches getLong, getBinary, getStruct, getArray, and copy based on rowType.getTypeAt(ordinal) - when projection shifts ordinals, the wrong type is looked up. Affects FlussAppendPartitionReader and FlussUpsertPartitionReader.
Solution
Override convertToSparkRow row type in subclasses - project(projection) for append, project(projectionWithPks) for upsert.
Are you willing to submit a PR?