spark-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davies <...@git.apache.org>
Subject [GitHub] spark pull request: [SPARK-13404] [SQL] Create variables for input...
Date Sat, 05 Mar 2016 07:12:36 GMT
Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/11274#discussion_r55117053
  
    --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/ExistingRDD.scala ---
    @@ -186,30 +184,37 @@ private[sql] case class PhysicalRDD(
           |   }
           | }""".stripMargin)
     
    +    ctx.INPUT_ROW = row
    +    ctx.currentVars = null
    +    val columns2 = exprs.map(_.gen(ctx))
    +    val inputRow = if (isUnsafeRow) row else null
         val scanRows = ctx.freshName("processRows")
         ctx.addNewFunction(scanRows,
           s"""
            | private void $scanRows(InternalRow $row) throws java.io.IOException {
    -       |   while (true) {
    +       |   boolean firstRow = true;
    +       |   while (!shouldStop() && (firstRow || $input.hasNext())) {
    --- End diff --
    
    @nongli Since we changed to use `continue` for predicates, it's tricky to get this right.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


Mime
View raw message