Skip to content

[spark] Column projection broken on log/upsert read path for type-dependent accessors #3029

@fresh-borzoni

Description

@fresh-borzoni

Search before asking

  • I searched in the issues and found nothing similar.

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?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions