[jira] [Updated] (CALCITE-3039) In Interpreter, min() incorrectly returns maximum double value
[ https://issues.apache.org/jira/browse/CALCITE-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Chunwei Lei updated CALCITE-3039: - Affects Version/s: (was: 1.17.0) 1.19.0 > In Interpreter, min() incorrectly returns maximum double value > -- > > Key: CALCITE-3039 > URL: https://issues.apache.org/jira/browse/CALCITE-3039 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.19.0 >Reporter: dijkspicy >Assignee: Chunwei Lei >Priority: Major > Labels: easyfix, pull-request-available > Fix For: 1.20.0 > > Time Spent: 2h 40m > Remaining Estimate: 0h > > {code:java} > //代码占位符 > /** Implementation of {@code MIN} function to calculate the minimum of > * {@code float} values as a user-defined aggregate. > */ > public static class MinFloat extends NumericComparison { > public MinFloat() { > super(Float.MAX_VALUE, Math::min); > } > } > /** Implementation of {@code MIN} function to calculate the minimum of > * {@code double} and {@code real} values as a user-defined aggregate. > */ > public static class MinDouble extends NumericComparison { > public MinDouble() { > super(Double.MAX_VALUE, Math::max); > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-3039) In Interpreter, min() incorrectly returns maximum double value
[ https://issues.apache.org/jira/browse/CALCITE-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hongze Zhang updated CALCITE-3039: -- Summary: In Interpreter, min() incorrectly returns maximum double value (was: In interpreter, min() incorrectly returns maximum double value) > In Interpreter, min() incorrectly returns maximum double value > -- > > Key: CALCITE-3039 > URL: https://issues.apache.org/jira/browse/CALCITE-3039 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.17.0 >Reporter: dijkspicy >Priority: Major > Labels: easyfix, pull-request-available > Time Spent: 20m > Remaining Estimate: 0h > > {code:java} > //代码占位符 > /** Implementation of {@code MIN} function to calculate the minimum of > * {@code float} values as a user-defined aggregate. > */ > public static class MinFloat extends NumericComparison { > public MinFloat() { > super(Float.MAX_VALUE, Math::min); > } > } > /** Implementation of {@code MIN} function to calculate the minimum of > * {@code double} and {@code real} values as a user-defined aggregate. > */ > public static class MinDouble extends NumericComparison { > public MinDouble() { > super(Double.MAX_VALUE, Math::max); > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-3039) In interpreter, min() incorrectly returns maximum double value
[ https://issues.apache.org/jira/browse/CALCITE-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] ASF GitHub Bot updated CALCITE-3039: Labels: easyfix pull-request-available (was: easyfix) > In interpreter, min() incorrectly returns maximum double value > -- > > Key: CALCITE-3039 > URL: https://issues.apache.org/jira/browse/CALCITE-3039 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.17.0 >Reporter: dijkspicy >Priority: Major > Labels: easyfix, pull-request-available > > {code:java} > //代码占位符 > /** Implementation of {@code MIN} function to calculate the minimum of > * {@code float} values as a user-defined aggregate. > */ > public static class MinFloat extends NumericComparison { > public MinFloat() { > super(Float.MAX_VALUE, Math::min); > } > } > /** Implementation of {@code MIN} function to calculate the minimum of > * {@code double} and {@code real} values as a user-defined aggregate. > */ > public static class MinDouble extends NumericComparison { > public MinDouble() { > super(Double.MAX_VALUE, Math::max); > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (CALCITE-3039) In interpreter, min() incorrectly returns maximum double value
[ https://issues.apache.org/jira/browse/CALCITE-3039?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Hongze Zhang updated CALCITE-3039: -- Summary: In interpreter, min() incorrectly returns maximum double value (was: Why MinFloat use Math::min while MinDouble use Math::max as its comparision in AggragateNode ?) > In interpreter, min() incorrectly returns maximum double value > -- > > Key: CALCITE-3039 > URL: https://issues.apache.org/jira/browse/CALCITE-3039 > Project: Calcite > Issue Type: Bug > Components: core >Affects Versions: 1.17.0 >Reporter: dijkspicy >Priority: Major > Labels: easyfix > > {code:java} > //代码占位符 > /** Implementation of {@code MIN} function to calculate the minimum of > * {@code float} values as a user-defined aggregate. > */ > public static class MinFloat extends NumericComparison { > public MinFloat() { > super(Float.MAX_VALUE, Math::min); > } > } > /** Implementation of {@code MIN} function to calculate the minimum of > * {@code double} and {@code real} values as a user-defined aggregate. > */ > public static class MinDouble extends NumericComparison { > public MinDouble() { > super(Double.MAX_VALUE, Math::max); > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)