Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New parameter data_type in the evaluate() method #32

Open
akshayphilar opened this issue Nov 30, 2019 · 2 comments
Open

New parameter data_type in the evaluate() method #32

akshayphilar opened this issue Nov 30, 2019 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@akshayphilar
Copy link
Member

Currently, pipeline expressions are required to be terminated with as_list or first based on the data type required at the output. However, given the fact that the required data type is known beforehand, it would be optimal and lead to more terse expressions if this were passed to the evaluate function, thus making the final transformation implicit.

@peonone @BurnzZ does this make sense?

@akshayphilar akshayphilar self-assigned this Nov 30, 2019
@akshayphilar akshayphilar added the enhancement New feature or request label Nov 30, 2019
@BurnzZ
Copy link
Contributor

BurnzZ commented Nov 30, 2019

@akshayphilar I'm all good for terse expressions promoting brevity. Although I'm not sure what you meant on this part:

... if this were passed to the evaluate function, thus making the final transformation implicit.

Could you provide some examples on this? For instance, if we have the double first expression as documented in #28, how will it change?

@akshayphilar
Copy link
Member Author

Notwithstanding the current quirks in the re_search function, which will be fixed separately as part of #30, the current expression which looks like this

r"sub(r',', '') | re_search(r'#(\d+)') | filter(lambda x: x) | first | int | first"

could have all 3 terminating pipe functions | first | int | first peeled away based on certain conditions.

We will need to evaluate how this will impact us in terms of overall robustness of the pipeline as well as it's comprehensibility. Will send a PR so that we discuss the ramifications of implicit vs explicit transformations.

cc @VMRuiz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants