Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/8953#discussion_r41454832
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/local/HashJoinNode.scala
---
@@ -73,10 +60,21 @@ case class HashJoinNode(
}
}
+ /** Sets the HashedRelation used by this node. */
+ protected def withHashedRelation(hashedRelation: HashedRelation): Unit =
{
+ hashed = hashedRelation
+ }
+
+ /**
+ * For nodes that extends this, they can use doOpen to add operations
needed in the open method.
+ * The implementation of this method should invoke its children's open
methods.
+ */
+ protected def doOpen(): Unit
+
override def open(): Unit = {
- buildNode.open()
- hashed = HashedRelation(buildNode, buildSideKeyGenerator)
- streamedNode.open()
+ // First, call doOpen to invoke custom operations for a node.
+ doOpen()
+ // Second, initialize common internal states.
--- End diff --
These comments still seem unnecessary :). I would remove them but feel free
to keep them if you prefer.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]