Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Added the prototype implementation of
CommandMapper
, which corresponds to theScriptOP
raised in issue #412. The following issues need discussion:Avoid creating subclasses like
PythonCodesOperator
orBashCodesOperator
, as this hinders extensibility. Consider that if users want to support more shell types likezsh
, or integrate with other programming languages or third-party tools, they would have to add new classes at the code level, which is cumbersome and unnecessary. With a singleCommandMapper
, we can maximize support for arbitrary extensions without modifying the source code.Operator naming. Currently, the operator is implemented as a mapper; therefore, the
Mapper
suffix is used instead of the originalScriptOP
. Other candidate names includeScriptMapper
,CodeMapper
,ExternalXXXMapper
, etc. I have opted forCommandMapper
because it is not limited to just code or scripts; it can actually execute any command, such as pre-compiled binary files.Everyone is welcome to provide feedback on the above issues, and I will add relevant documentation after reaching a consensus.