Skip to content

[flink] Add $stream suffix for Fluss-only reads - #5212

Open
loserwang1024 wants to merge 3 commits into
apache:mainfrom
loserwang1024:fluss_stream
Open

loserwang1024 wants to merge 3 commits into
apache:mainfrom
loserwang1024:fluss_stream

Conversation

@loserwang1024

Copy link
Copy Markdown
Contributor

Conflicts:

Purpose

Linked issue: close #5211

Brief change log

Tests

API and Format

Documentation

@loserwang1024

Copy link
Copy Markdown
Contributor Author

@luoyuxia @leonardBang , would you like to have a look?

@leonardBang
leonardBang self-requested a review November 16, 2026 05:34
writer.flush();
}
TableBucket bucket = new TableBucket(admin.getTableInfo(path).get().getTableId(), 0);
FLUSS_CLUSTER_EXTENSION.triggerAndWaitSnapshots(Collections.singletonList(bucket));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to add an end-to-end case with an actual lake snapshot, perhaps in the existing Paimon tiering test suite? The snapshots created here are Fluss KV snapshots, so these tests cover lake-enabled tables without exercising the case where lake data is already available. It would be helpful to verify that the base table can read rows retained only in the lake, while $stream scans and both synchronous and asynchronous lookup joins exclude them, including an expired partition with historical-partition fallback enabled. This would help protect the main Fluss-only read contract against future regressions.


Normal projection and filter expressions are supported. For partitioned tables, scans cover the
current regular Fluss partitions; expired partitions and the historical system partition are not
included. Lookup joins are supported and return no match for missing Fluss partitions, without

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for adding the Fluss-Only Reads section and the batch query examples! Could we also include runnable SQL examples for a streaming read and a temporal lookup join against $stream, with the minimal table/data setup or links to the relevant setup instructions? These paths are currently described in prose; concrete examples would make it easier for users to choose a startup mode and see how to use $stream as the lookup table. It may also be helpful to show the expected result when a Fluss partition is missing, so the no-lake-fallback behavior is clear in practice.

Hongshun Wang and others added 3 commits November 27, 2026 17:04
Extend the existing historical partition test to compare lake union reads
with $stream batch scans, streaming scans, and synchronous and asynchronous
lookup joins after partition expiration. Keep an active partition as a
positive control and reuse both existing primary key layouts.

Co-Authored-By: Codex <noreply@openai.com>
AI-Model: gpt-6-astra
AI-Contributed/Feature: 0/0
AI-Contributed/UT: 111/111
Disable historical partition reads in the source configuration for
Fluss-only scans. Read the override in the enumerator, falling back to
table metadata without adding constructor parameters.

Reuse the historical changelog integration cases to verify that $stream
excludes historical records for primary-key and append-only tables.

Co-Authored-By: Codex <noreply@openai.com>
AI-Model: gpt-6-astra
AI-Contributed/Feature: 16/16
AI-Contributed/UT: 12/12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a $stream suffix for Fluss-only reads on lake-enabled tables

2 participants