AndreaBozzo opened a new pull request, #1953:
URL: https://github.com/apache/iceberg-rust/pull/1953
This PR refactors the schedule file parsing in the sqllogictest crate to use
serde-derived structs instead of manual TOML parsing, as requested in #1952.
### Changes
- **New structs with serde derives:**
- `ScheduleConfig` - top-level configuration parsed from TOML
- `EngineConfig` - per-engine configuration with `#[serde(flatten)]` for
extensibility
- `EngineType` - enum of supported engine types
- **Refactored parsing flow:**
- `Schedule::from_file()` now uses `toml::from_str()` directly
- Added `instantiate_engines()` to separate parsing from engine creation
- Removed manual `parse_engines()` and `parse_steps()` functions
- **Forward-compatibility:**
- Uses `#[serde(flatten)]` to capture extra fields in `EngineConfig.extra`
- This enables PR #1943 to easily add `catalog_type` and
`catalog_properties` support
### Relation to #1943
This PR was suggested by @liurenjie1024 as a prerequisite to #1943 (dynamic
catalog configuration). The `#[serde(flatten)]` approach allows #1943 to simply
extract the catalog configuration from `EngineConfig.extra` without modifying
the parsing logic.
### Testing
- All existing tests pass
- Added new unit tests for deserialization behavior
- Integration test with `df_test.toml` passes unchanged
Closes #1952
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]