[GitHub] spark pull request #15275: [SPARK-17702][SQL] Code generation including too ...
Github user asfgit closed the pull request at: https://github.com/apache/spark/pull/15275 --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #15275: [SPARK-17702][SQL] Code generation including too ...
Github user ueshin commented on a diff in the pull request: https://github.com/apache/spark/pull/15275#discussion_r81446511 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala --- @@ -589,6 +592,11 @@ class CodegenContext { // Cannot split these expressions because they are not created from a row object. return expressions.mkString("\n") } +splitExpressions(expressions, "apply", ("InternalRow", row) :: Nil) + } + + private def splitExpressions( + expressions: Seq[String], funcName: String, arguments: Seq[(String, String)]): String = { --- End diff -- I didn't have a special reason. Should we make it public? @rxin, @davies --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #15275: [SPARK-17702][SQL] Code generation including too ...
Github user kiszk commented on a diff in the pull request: https://github.com/apache/spark/pull/15275#discussion_r81440653 --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeGenerator.scala --- @@ -589,6 +592,11 @@ class CodegenContext { // Cannot split these expressions because they are not created from a row object. return expressions.mkString("\n") } +splitExpressions(expressions, "apply", ("InternalRow", row) :: Nil) + } + + private def splitExpressions( + expressions: Seq[String], funcName: String, arguments: Seq[(String, String)]): String = { --- End diff -- How about exposing this API as non-public? This API looks more flexible and reusable.Is there any reason to declare as private? --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org
[GitHub] spark pull request #15275: [SPARK-17702][SQL] Code generation including too ...
GitHub user ueshin opened a pull request: https://github.com/apache/spark/pull/15275 [SPARK-17702][SQL] Code generation including too many mutable states exceeds JVM size limit. ## What changes were proposed in this pull request? Code generation including too many mutable states exceeds JVM size limit to extract values from `references` into fields in the constructor. We should split the generated extractions in the constructor into smaller functions. ## How was this patch tested? I added some tests to check if the generated codes for the expressions exceed or not. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ueshin/apache-spark issues/SPARK-17702 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/15275.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #15275 commit 4c78ca91d0c0e096e5b0668f35a0d24457e36586 Author: Takuya UESHINDate: 2016-09-28T04:19:34Z Add a test to reproduce the issue. commit 858a3ec54f78b4865c19ec46aebc9320b36f02b5 Author: Takuya UESHIN Date: 2016-09-28T04:26:38Z Split wide constructor into blocks due to JVM code size limit. --- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- - To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org