GitHub user JeroenWarmerdam opened a pull request: https://github.com/apache/spark/pull/4646
Fixed overflow on large range with high number of partitions The following use case causes an overflow when creating the partitions inside JdbcRDD: ``` val jdbcRDD = new TJdbcRDD(sc, () => DriverManager.getConnection(url, username, password), "SELECT id FROM twitter_statuses WHERE ? <= id AND id <= ?", lowerBound = 1131544775L, upperBound = 567279358897692673L, numPartitions = 20, mapRow = r => (r.getLong("id")) ) ``` This is fixed by swapping division and multiplication in the creation of partitions. You can merge this pull request into a Git repository by running: $ git pull https://github.com/JeroenWarmerdam/spark master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/spark/pull/4646.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 #4646 ---- commit 53f3a67b08c3e980c9dca0eb56fcb5094c8ff7d9 Author: Jeroen Warmerdam <jwarmer...@agtinternational.com> Date: 2015-02-17T09:21:55Z Fixed overflow on large range with high number of partitions ---- --- 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