ccaominh commented on a change in pull request #8355: Fix result of division
may be truncated
URL: https://github.com/apache/incubator-druid/pull/8355#discussion_r316876341
##########
File path: examples/bin/dsql-main
##########
@@ -57,15 +58,15 @@ def do_query(url, sql, context, timeout, user,
ignore_ssl_verification, ca_file,
query_context = context
elif int(context.get('timeout', 0)) / 1000 < timeout:
Review comment:
The shebang line specifies `python`, which typically means "python 2" and is
consistent with the invocation of the script in `examples/bin/dsql`:
```bash
exec python2 "$WHEREAMI/dsql-main" "$@"
```
If we want to keep the script content as python2 (except for the python3
`print()` function), then this line can be changed to:
```python
elif int(context.get('timeout', 0)) / 1000.0 < timeout:
```
instead of using
```python
from __future__ import division
```
which minimizes the (potentially confusing) combination of python2 and
python3 in the same file.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]