Files
impala/tests/query_test/test_decimal_fuzz.py
Joe McDonnell b90d636407 IMPALA-14104: Fix TestDecimalFuzz on Python 3
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>
2025-05-28 15:55:52 +00:00

11 KiB