mirror of
https://github.com/apache/impala.git
synced 2025-12-19 18:12:08 -05:00
TestDecimalFuzz uses division to calculate the number of iterations for certain tests. On Python 3, division produces a float and range() will not take a float as an argument. In theory, the "from __future__ import division" was supposed to produce the same behavior on Python 2 and 3, but in practice, the "from builtins import range" allows a float argument to range() on Python 2 but not Python 3. This fixes the issue by explicitly casting to an integer. Testing: - Ran TestDecimalFuzz with Python 3 Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c Reviewed-on: http://gerrit.cloudera.org:8080/22955 Reviewed-by: Riza Suminto <riza.suminto@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
11 KiB
11 KiB