Skip to content

[Feature] Introduce fixed partition for Flink lookup join #5080

@chenxinwei

Description

@chenxinwei

Search before asking

  • I searched in the issues and found nothing similar.

Motivation

In the data backtracking scenario of Flink tasks, sometimes we don't want to use the latest partition during the lookup join. Instead, we expect to restore the original state of the data as much as possible by specifying a fixed partition.

We introduce a fixed partition mechanism here to look up the given partition.

Refer to the following example:

CREATE TABLE customers (
id INT,
name STRING,
country STRING,
zip STRING,
dt STRING,
PRIMARY KEY (id, dt) NOT ENFORCED
) PARTITIONED BY (dt);

SELECT o.order_id, o.total, c.country, c.zip
FROM orders AS o
JOIN customers /*+ OPTIONS('lookup.fixed-partition'='2025-02-13') */
FOR SYSTEM_TIME AS OF o.proc_time AS c
ON o.customer_id = c.id;

Solution

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions