Skip to content

Conversation

ggevay
Copy link
Contributor

@ggevay ggevay commented Aug 15, 2025

Works towards the Small Coordinator vision, specifically https://github.com/MaterializeInc/database-issues/issues/9593

These methods don't need to be on Coordinator, because they only work with the Catalog. This PR moves them to Catalog, making them easier to call outside the Coordinator.

This PR is purely code movement, no behavior change should happen from it.

Motivation

  • This PR refactors existing code.

Tips for reviewer

Checklist

  • This PR has adequate test coverage / QA involvement has been duly considered. (trigger-ci for additional test/nightly runs)
  • This PR has an associated up-to-date design doc, is a design doc (template), or is sufficiently small to not require a design.
  • If this PR evolves an existing $T ⇔ Proto$T mapping (possibly in a backwards-incompatible way), then it is tagged with a T-proto label.
  • If this PR will require changes to cloud orchestration or tests, there is a companion cloud PR to account for those changes that is tagged with the release-blocker label (example).
  • If this PR includes major user-facing behavior changes, I have pinged the relevant PM to schedule a changelog post.

@ggevay ggevay requested a review from aljoscha August 15, 2025 14:04
@ggevay ggevay requested review from a team as code owners August 15, 2025 14:04
@ggevay ggevay added the A-ADAPTER Topics related to the ADAPTER layer label Aug 15, 2025
let builtin_table_updates = self.state.apply_updates(updates)?;
Ok(builtin_table_updates)
}

Copy link
Member

Choose a reason for hiding this comment

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

Nit: The catalog.rs file is already very large, so I think it'd make sense to have it split across several files. This seems like an opportunity to do so?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I'd say we can create a new module catalog/timeline and move the methods there. Wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Btw., I've split off only the newly moved code now, but should I try to split off more stuff into separate files in a follow-up PR? Ideas:

  • CatalogPlans and related methods (~200 lines)
  • expression cache stuff
  • ExprHumanizer (~150 lines)
  • ConnCatalog
  • ...

Copy link
Contributor

@aljoscha aljoscha left a comment

Choose a reason for hiding this comment

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

Excellent! But would be good to move to a new module as Moritz suggested before merging.

@ggevay ggevay force-pushed the move-timeline-things-to-catalog branch from a58c0b8 to c9660fb Compare August 20, 2025 18:07
@ggevay ggevay force-pushed the move-timeline-things-to-catalog branch from c9660fb to 55f756a Compare August 20, 2025 18:08
@ggevay
Copy link
Contributor Author

ggevay commented Aug 22, 2025

Merging! Can do more catalog.rs splitting later.

@ggevay ggevay merged commit edd9a4c into MaterializeInc:main Aug 22, 2025
129 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ADAPTER Topics related to the ADAPTER layer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants