Skip to content

[flink] Batch query on empty datalake-enabled table should return 0 rows instead of failing with UnsupportedOperationException #3207

@binary-signal

Description

@binary-signal

Search before asking

  • I searched in the issues and found nothing similar.

Fluss version

main (development)

Please describe the bug 🐞

When a Fluss table has table.datalake.enabled = true but is empty (no data written yet, so no lake snapshot has been tiered), running a batch query via Flink SQL fails with:

 java.lang.UnsupportedOperationException: Currently, Batch mode can only be supported if one lake snapshot exists for the table.

Solution

The expected behavior is to return an empty result set (0 rows). The Spark connector already handles this correctly by falling back gracefully.

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