[ https://issues.apache.org/jira/browse/CALCITE-6277?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Caican Cai updated CALCITE-6277: -------------------------------- Description: {code:java} log10('-Infinity'); log2('-Infinity'); power('Infinity',2){code} As above, using the + infinity function in some math functions will not report an error in calcite, but mysql and posgtres will not report an error. I think the + infinity parameter is meaningful in mathematics. {code:java} --postgres postgres=# select power('Infinity', -2); power ------- 0 (1 row)postgres=# select log('Infinity', 2); log ----- 0 (1 row)postgres=# select log10('Infinity'); log10 ---------- Infinity (1 row)postgres=# select power('Infinity', 2); power ---------- Infinity (1 row) --mysql mysql> select log10('+Infinity'); +--------------------+ | log10('+Infinity') | +--------------------+ | NULL | +--------------------+ 1 row in set, 2 warnings (0.00 sec)mysql> select power('Infinity', 2); +----------------------+ | power('Infinity', 2) | +----------------------+ | 0 | +----------------------+ 1 row in set, 1 warning (0.00 sec)mysql> select power('-Infinity', 2); +-----------------------+ | power('-Infinity', 2) | +-----------------------+ | 0 | +-----------------------+ 1 row in set, 1 warning (0.00 sec)mysql> select log10('-Infinity'); +--------------------+ | log10('-Infinity') | +--------------------+ | NULL | +--------------------+ 1 row in set, 2 warnings (0.00 sec) {code} was: {code:java} log10('-Infinity'); log2('-Infinity'); power('Infinity',2){code} As above, using the + infinity function in some math functions will not report an error, but mysql and posgtres will not report an error. I think the + infinity parameter is meaningful in mathematics. {code:java} --postgres postgres=# select power('Infinity', -2); power ------- 0 (1 row)postgres=# select log('Infinity', 2); log ----- 0 (1 row)postgres=# select log10('Infinity'); log10 ---------- Infinity (1 row)postgres=# select power('Infinity', 2); power ---------- Infinity (1 row) --mysql mysql> select log10('+Infinity'); +--------------------+ | log10('+Infinity') | +--------------------+ | NULL | +--------------------+ 1 row in set, 2 warnings (0.00 sec)mysql> select power('Infinity', 2); +----------------------+ | power('Infinity', 2) | +----------------------+ | 0 | +----------------------+ 1 row in set, 1 warning (0.00 sec)mysql> select power('-Infinity', 2); +-----------------------+ | power('-Infinity', 2) | +-----------------------+ | 0 | +-----------------------+ 1 row in set, 1 warning (0.00 sec)mysql> select log10('-Infinity'); +--------------------+ | log10('-Infinity') | +--------------------+ | NULL | +--------------------+ 1 row in set, 2 warnings (0.00 sec) {code} > About the processing of +infinity parameters and -infinity parameters in > math function > --------------------------------------------------------------------------------------- > > Key: CALCITE-6277 > URL: https://issues.apache.org/jira/browse/CALCITE-6277 > Project: Calcite > Issue Type: Improvement > Components: core > Affects Versions: 1.36.0 > Reporter: Caican Cai > Priority: Major > Fix For: 1.37.0 > > > {code:java} > log10('-Infinity'); > log2('-Infinity'); > power('Infinity',2){code} > As above, using the + infinity function in some math functions will not > report an error in calcite, but mysql and posgtres will not report an error. > I think the + infinity parameter is meaningful in mathematics. > {code:java} > --postgres > postgres=# select power('Infinity', -2); > power > ------- > 0 > (1 row)postgres=# select log('Infinity', 2); > log > ----- > 0 > (1 row)postgres=# select log10('Infinity'); > log10 > ---------- > Infinity > (1 row)postgres=# select power('Infinity', 2); > power > ---------- > Infinity > (1 row) > > --mysql > mysql> select log10('+Infinity'); > +--------------------+ > | log10('+Infinity') | > +--------------------+ > | NULL | > +--------------------+ > 1 row in set, 2 warnings (0.00 sec)mysql> select power('Infinity', 2); > +----------------------+ > | power('Infinity', 2) | > +----------------------+ > | 0 | > +----------------------+ > 1 row in set, 1 warning (0.00 sec)mysql> select power('-Infinity', 2); > +-----------------------+ > | power('-Infinity', 2) | > +-----------------------+ > | 0 | > +-----------------------+ > 1 row in set, 1 warning (0.00 sec)mysql> select log10('-Infinity'); > +--------------------+ > | log10('-Infinity') | > +--------------------+ > | NULL | > +--------------------+ > 1 row in set, 2 warnings (0.00 sec) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)