[jira] [Created] (CARBONDATA-2372) Potential division by zero in InputProcessorStepForPartitionImpl#partitionInputReaderIterators

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (CARBONDATA-2372) Potential division by zero in InputProcessorStepForPartitionImpl#partitionInputReaderIterators

Akash R Nilugal (Jira)
Ted Yu created CARBONDATA-2372:
----------------------------------

             Summary: Potential division by zero in InputProcessorStepForPartitionImpl#partitionInputReaderIterators
                 Key: CARBONDATA-2372
                 URL: https://issues.apache.org/jira/browse/CARBONDATA-2372
             Project: CarbonData
          Issue Type: Bug
            Reporter: Ted Yu


{code}
    int parallelThreadNumber = Math.min(inputIterators.length, numberOfCores);
{code}
parallelThreadNumber is later used in:
{code}
      iterators[i % parallelThreadNumber].add(inputIterators[i]);
{code}
We should check that parallelThreadNumber is not zero before the division.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)