Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support using index in backfilling #19298

Open
hzxa21 opened this issue Nov 7, 2024 · 3 comments
Open

Support using index in backfilling #19298

hzxa21 opened this issue Nov 7, 2024 · 3 comments
Assignees
Milestone

Comments

@hzxa21
Copy link
Collaborator

hzxa21 commented Nov 7, 2024

Is your feature request related to a problem? Please describe.

basically if we are creating a sink from A to B, and we know B or B's downstream prefer the backfilling rows to be ordered by X, we better add ORDER BY X to A if A is a MV, or create a new MV A' as SELECT .. from A ORDER BY X and create the sink from A'

Sometimes we need backfilling to emit rows in a specific ordering to reduce unnecessary downstream changes. Currently we can work around it by creating a MV with ORDER BY and use this MV for backfilling but this MV cannot be dropped after backfilling because it exists in the streaming graph. Instead, using index for backfilling seems more flexible.

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

@github-actions github-actions bot added this to the release-2.2 milestone Nov 7, 2024
@xxchan
Copy link
Member

xxchan commented Nov 8, 2024

This was also once mentioned here #12824 (comment)

@kwannoel
Copy link
Contributor

Currently we can work around it by creating a MV with ORDER BY and use this MV for backfilling but this MV cannot be dropped after backfilling because it exists in the streaming graph. Instead, using index for backfilling seems more flexible.

Do you mean that you'd like to use the index for backfilling side, but the MV for the upstream side? And then be able to drop the index after backfilling done?

@xxchan
Copy link
Member

xxchan commented Nov 21, 2024

Yes, the index is only useful for backfilling. Persisting data twice both in MV and index seems to wasteful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants