Uploaded image for project: 'Spark'
  1. Spark
  2. SPARK-5201

ParallelCollectionRDD.slice(seq, numSlices) has int overflow when dealing with inclusive range

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.0.0
    • Fix Version/s: 1.2.1, 1.3.0
    • Component/s: Spark Core
    • Labels:

      Description

       sc.makeRDD(1 to (Int.MaxValue)).count       // result = 0
       sc.makeRDD(1 to (Int.MaxValue - 1)).count   // result = 2147483646 = Int.MaxValue - 1
       sc.makeRDD(1 until (Int.MaxValue)).count    // result = 2147483646 = Int.MaxValue - 1
      

      More details on the discussion https://github.com/apache/spark/pull/2874

        Attachments

          Activity

            People

            • Assignee:
              advancedxy Xianjin YE
              Reporter:
              advancedxy Xianjin YE
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2h
                2h
                Remaining:
                Remaining Estimate - 2h
                2h
                Logged:
                Time Spent - Not Specified
                Not Specified