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
Fix bug in MapNode #544
Fix bug in MapNode #544
Conversation
MapNode is responsible for PlainMapOperatorBase and not for MapOperatorBase, but this is a mess right now.
I had a fix for this in #542 as well ;-) |
public MapOperatorBase<?> getPactContract() { | ||
return (MapOperatorBase<?>) super.getPactContract(); | ||
public PlainMapOperatorBase<?> getPactContract() { | ||
return (PlainMapOperatorBase<?>) super.getPactContract(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct me if I am wrong, but won't this break with the Record API where Map extends MapOperatorBase?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's what I meant by historic reasons. We could change FlatMap and call the method there map() as well...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My fix removed the method as it was done before the merge and the build passed Travis.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works as well, because MapOperatorBase is converted to a CollectorMapNode, not this MapNode here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright then ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that this needs urgent cleanout. I'll try and look over the PRs
soon...
Damn. Can we agree to a |
I agree if the two +1 do not include the PR author. |
Okay. Makes sense. |
I agree with cleaning up the situation. It also took me quite some time to figure out how the different MapOperators relate to each other... |
The bug was fixed by another commit. |
MapNode is responsible for PlainMapOperatorBase and not for
MapOperatorBase, but this is a mess right now.
Maybe we should think about cleaning the situation a bit. CollectorMap is the same as FlatMap, only the function in the interface is called map instead of flatMap. I know that this is because of historic reasons but it is still a mess because we handle all three types through the layers. For example, some code in PactCompiler looks like this: