You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@impala.apache.org by "Joe McDonnell (Code Review)" <ge...@cloudera.org> on 2025/05/27 22:29:51 UTC

[Impala-ASF-CR] IMPALA-14104: Fix TestDecimalFuzz on Python 3

Joe McDonnell has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22955


Change subject: IMPALA-14104: Fix TestDecimalFuzz on Python 3
......................................................................

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
---
M tests/query_test/test_decimal_fuzz.py
1 file changed, 1 insertion(+), 1 deletion(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/55/22955/1
-- 
To view, visit http://gerrit.cloudera.org:8080/22955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c
Gerrit-Change-Number: 22955
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>

[Impala-ASF-CR] IMPALA-14104: Fix TestDecimalFuzz on Python 3

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22955 )

Change subject: IMPALA-14104: Fix TestDecimalFuzz on Python 3
......................................................................


Patch Set 2:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/19327/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/22955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c
Gerrit-Change-Number: 22955
Gerrit-PatchSet: 2
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 27 May 2025 23:16:50 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14104: Fix TestDecimalFuzz on Python 3

Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Joe McDonnell has posted comments on this change. ( http://gerrit.cloudera.org:8080/22955 )

Change subject: IMPALA-14104: Fix TestDecimalFuzz on Python 3
......................................................................


Patch Set 1:

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22955/1/tests/query_test/test_decimal_fuzz.py
File tests/query_test/test_decimal_fuzz.py:

http://gerrit.cloudera.org:8080/#/c/22955/1/tests/query_test/test_decimal_fuzz.py@47
PS1, Line 47: cls.iterations = int(total_iterations / len(batches))
> Can also use integer division operator (//)
Good point, switched



-- 
To view, visit http://gerrit.cloudera.org:8080/22955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c
Gerrit-Change-Number: 22955
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 27 May 2025 22:57:02 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14104: Fix TestDecimalFuzz on Python 3

Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22955 )

Change subject: IMPALA-14104: Fix TestDecimalFuzz on Python 3
......................................................................


Patch Set 1: Code-Review+2

(1 comment)

http://gerrit.cloudera.org:8080/#/c/22955/1/tests/query_test/test_decimal_fuzz.py
File tests/query_test/test_decimal_fuzz.py:

http://gerrit.cloudera.org:8080/#/c/22955/1/tests/query_test/test_decimal_fuzz.py@47
PS1, Line 47: cls.iterations = int(total_iterations / len(batches))
Can also use integer division operator (//)



-- 
To view, visit http://gerrit.cloudera.org:8080/22955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c
Gerrit-Change-Number: 22955
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 27 May 2025 22:35:08 +0000
Gerrit-HasComments: Yes

[Impala-ASF-CR] IMPALA-14104: Fix TestDecimalFuzz on Python 3

Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Hello Riza Suminto, Impala Public Jenkins, 

I'd like you to reexamine a change. Please visit

    http://gerrit.cloudera.org:8080/22955

to look at the new patch set (#2).

Change subject: IMPALA-14104: Fix TestDecimalFuzz on Python 3
......................................................................

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
---
M tests/query_test/test_decimal_fuzz.py
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/55/22955/2
-- 
To view, visit http://gerrit.cloudera.org:8080/22955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newpatchset
Gerrit-Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c
Gerrit-Change-Number: 22955
Gerrit-PatchSet: 2
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14104: Fix TestDecimalFuzz on Python 3

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22955 )

Change subject: IMPALA-14104: Fix TestDecimalFuzz on Python 3
......................................................................


Patch Set 1:

Build Successful 

https://jenkins.impala.io/job/gerrit-code-review-checks/19326/ : Initial code review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun to run full precommit tests.


-- 
To view, visit http://gerrit.cloudera.org:8080/22955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c
Gerrit-Change-Number: 22955
Gerrit-PatchSet: 1
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 27 May 2025 22:57:23 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14104: Fix TestDecimalFuzz on Python 3

Posted by "Joe McDonnell (Code Review)" <ge...@cloudera.org>.
Joe McDonnell has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22955 )

Change subject: IMPALA-14104: Fix TestDecimalFuzz on Python 3
......................................................................

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 <ri...@cloudera.com>
Tested-by: Impala Public Jenkins <im...@cloudera.com>
---
M tests/query_test/test_decimal_fuzz.py
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  Riza Suminto: Looks good to me, approved
  Impala Public Jenkins: Verified

-- 
To view, visit http://gerrit.cloudera.org:8080/22955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c
Gerrit-Change-Number: 22955
Gerrit-PatchSet: 3
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>

[Impala-ASF-CR] IMPALA-14104: Fix TestDecimalFuzz on Python 3

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22955 )

Change subject: IMPALA-14104: Fix TestDecimalFuzz on Python 3
......................................................................


Patch Set 2: Verified+1


-- 
To view, visit http://gerrit.cloudera.org:8080/22955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c
Gerrit-Change-Number: 22955
Gerrit-PatchSet: 2
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 28 May 2025 06:16:00 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14104: Fix TestDecimalFuzz on Python 3

Posted by "Riza Suminto (Code Review)" <ge...@cloudera.org>.
Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22955 )

Change subject: IMPALA-14104: Fix TestDecimalFuzz on Python 3
......................................................................


Patch Set 2: Code-Review+2


-- 
To view, visit http://gerrit.cloudera.org:8080/22955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c
Gerrit-Change-Number: 22955
Gerrit-PatchSet: 2
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Tue, 27 May 2025 23:15:57 +0000
Gerrit-HasComments: No

[Impala-ASF-CR] IMPALA-14104: Fix TestDecimalFuzz on Python 3

Posted by "Impala Public Jenkins (Code Review)" <ge...@cloudera.org>.
Impala Public Jenkins has posted comments on this change. ( http://gerrit.cloudera.org:8080/22955 )

Change subject: IMPALA-14104: Fix TestDecimalFuzz on Python 3
......................................................................


Patch Set 2:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/11944/ DRY_RUN=true


-- 
To view, visit http://gerrit.cloudera.org:8080/22955
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I4cd4daecde690bf41a4e412c02c23cbb6ae5a14c
Gerrit-Change-Number: 22955
Gerrit-PatchSet: 2
Gerrit-Owner: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Impala Public Jenkins <im...@cloudera.com>
Gerrit-Reviewer: Joe McDonnell <jo...@cloudera.com>
Gerrit-Reviewer: Riza Suminto <ri...@cloudera.com>
Gerrit-Comment-Date: Wed, 28 May 2025 00:09:56 +0000
Gerrit-HasComments: No