SEZ9 commented on PR #11109: URL: https://github.com/apache/seatunnel/pull/11109#issuecomment-4727828087
@yzeng1618 Great work on this PR! Extending the metadata lookup to include `transform` plugins and supporting `valueConstraints` is a crucial enhancement. It directly addresses the blind spots in the LLM prompt generation from the initial CLI implementation (#10789) and will significantly reduce runtime errors caused by missing constraints (like blank SQL queries). The implementation looks solid overall. To make this feature even more robust and complete, here are a few suggestions regarding tests and documentation: **1. Test Coverage Enhancements:** While the current unit tests (`test_connector_metadata.py`) excellently cover the happy paths, I suggest adding a few edge-case tests for `_value_constraint_to_dict()` and `_format_value_constraint()`. Specifically: - **Fault tolerance:** What happens if the `conditionTree` is malformed, missing entirely, or if `expectValue` is an unexpected type? Ensuring graceful degradation without throwing unhandled exceptions will make the CLI more resilient. - **Operator formatting:** Currently, custom operators like `"extension"` might produce slightly awkward prompt strings (e.g., `` `query` extension must not be blank ``). We might want to ensure the LLM fully understands this phrasing, or eventually map these to more natural language. **2. Documentation Updates:** Since this is a user-facing improvement that enhances the capabilities of the CLI, we should update the documentation to reflect it: - Please update `seatunnel-cli/README.md` and `seatunnel-cli/README.zh-CN.md`. Under the "Features" or "Architecture" sections, explicitly mention that the CLI now provides full metadata, option rules, and constraint validation for **Transform** plugins as well. - It would also be helpful to add a brief note in the interactive `/connectors` command help section indicating that transform constraints are now fully supported. Thanks Again! -- 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]
