Github user zsxwing commented on a diff in the pull request:
https://github.com/apache/spark/pull/8535#discussion_r39166887
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/local/LocalNode.scala ---
@@ -73,17 +83,49 @@ abstract class LocalNode extends TreeNode[LocalNode] {
}
result
}
+
+ protected def newMutableProjection(
+ expressions: Seq[Expression],
+ inputSchema: Seq[Attribute]): () => MutableProjection = {
+ log.debug(
+ s"Creating MutableProj: $expressions, inputSchema: $inputSchema,
codegen:$codegenEnabled")
+ if(codegenEnabled) {
+ try {
+ GenerateMutableProjection.generate(expressions, inputSchema)
+ } catch {
+ case e: Exception =>
+ if (isTesting) {
+ throw e
+ } else {
+ log.error("Failed to generate mutable projection, fallback to
interpreted", e)
--- End diff --
Not sure. I saw many places in SQL uses them so I just followed the style.
---
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]