GitHub user clockfly opened a pull request: https://github.com/apache/spark/pull/14445
[SPARK-16320][SQL] Fix performance regression for parquet table with nested fields ## What changes were proposed in this pull request? For non-partitioned parquet table with nested column, Spark 2.0 adds an extra unnecessary memory copy to append partition values for each row. By fixing this bug, we get about 30% performance gain in test case like this: ``` // Generates parquet table with nested columns spark.range(100000000).select(struct($"id").as("nc")).write.parquet("/tmp/data4") val t0 = System.nanoTime() val x = ((0 until 20).toList.map(x => time(spark.read.parquet("/tmp/data4").filter($"nc.id" < 100).collect()))).sum/20 println("Elapsed time: " + (System.nanoTime() - t0)/1000000 + "ms") ``` ## How was this patch tested? Existing unit tests You can merge this pull request into a Git repository by running: $ git pull https://github.com/clockfly/spark fix_parquet_regression_2 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/14445.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 #14445 ---- commit 272fb8100f1861d78f78d7bc34e1ff68284b773a Author: Sean Zhong <seanzh...@databricks.com> Date: 2016-08-01T04:29:44Z fix parquet_regression ---- --- 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