GitHub user ala opened a pull request: https://github.com/apache/spark/pull/16829
[SPARK-19447] Fixing input metrics for range operator. ## What changes were proposed in this pull request? This change introduces a new metric "number of generated rows". It is used exclusively for Range, which is a leaf in the query tree, yet doesn't read any input data, and therefore cannot report "recordsRead". Additionally the way in which the metrics are reported by the JIT-compiled version of Range was changed. Previously, it was immediately reported that all the records were produced. This could be confusing for a user monitoring execution progress in the UI. Now, the metric is updated gradually. In order to avoid negative impact on Range performance, the code generation was reworked. The values are now produced in batches in the tighter inner loop, while the metrics are updated in the outer loop. The change also contains a number of unit tests, which should help ensure the correctness of metrics for various input sources. ## How was this patch tested? Unit tests. You can merge this pull request into a Git repository by running: $ git pull https://github.com/ala/spark SPARK-19447 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/16829.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 #16829 ---- commit aa6892a320dc098d8c3c517bed7caaa642059c17 Author: Ala Luszczak <a...@databricks.com> Date: 2017-02-03T16:25:51Z [SPARK-19447] Fixing input metrics for range operator. ---- --- 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