Skip to content

Conversation

@yunchipang
Copy link
Contributor

@yunchipang yunchipang commented Sep 2, 2025

Description

Implement auto enum binding generation for Python APIs to eliminate manual duplication and enable extensible multi-language binding support. Currently only applies to HudiTableConfig and HudiReadConfig.

crates/macros/: new shared macro crate supporting multiple language bindings, other language bindings can be easily extended in the future.

closes #404

How are the changes test-covered

  • N/A
  • Automated tests (unit and/or integration tests)
  • Manual tests
    • Details are described below

@yunchipang yunchipang requested a review from xushiyan as a code owner September 2, 2025 08:27
TIMELINE_LAYOUT_VERSION = "hoodie.timeline.layout.version"
TIMELINE_TIMEZONE = "hoodie.table.timeline.timezone"

class HudiReadConfig(Enum):
Copy link
Member

Choose a reason for hiding this comment

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

the goal is to auto expose the config enums so we don't have to copy the config strings for another language binding. try to research if this is doable with pyo3 to bind python enum to a rust enum without duplicating every config entry.

Copy link
Contributor Author

@yunchipang yunchipang Sep 5, 2025

Choose a reason for hiding this comment

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

@xushiyan i added a macros crate to auto-gen enums for python using pyo3. PTAL if this aligns better with the goal. thanks!

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.

Export HudiTableConfig and HudiReadConfig as enum in Python APIs

2 participants