[
https://issues.apache.org/jira/browse/FLINK-7161?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16084993#comment-16084993
]
ASF GitHub Bot commented on FLINK-7161:
---------------------------------------
Github user KurtYoung commented on a diff in the pull request:
https://github.com/apache/flink/pull/4305#discussion_r127107209
--- Diff:
flink-core/src/main/java/org/apache/flink/configuration/Configuration.java ---
@@ -843,11 +843,14 @@ private float convertToFloat(Object o, float
defaultValue) {
}
else if (o.getClass() == Double.class) {
double value = ((Double) o);
- if (value <= Float.MAX_VALUE && value >=
Float.MIN_VALUE) {
- return (float) value;
- } else {
+ if (value < -Float.MAX_VALUE
--- End diff --
I'm afraid in that case, 0 can not be treated right, so i add a test case
to check.
> Fix misusage of Double.MIN_VALUE and Float.MIN_VALUE
> ----------------------------------------------------
>
> Key: FLINK-7161
> URL: https://issues.apache.org/jira/browse/FLINK-7161
> Project: Flink
> Issue Type: Bug
> Affects Versions: 1.3.1
> Reporter: Kurt Young
> Assignee: Kurt Young
>
> In FloatSummaryAggregator and DoubleSummaryAggregator, we used
> Float.MIN_VALUE and Double.MIN_VALUE to be the initial values when doing max
> aggregation which is wrong.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)