Uploaded image for project: 'Calcite'
  1. Calcite
  2. CALCITE-6277

About the processing of +infinity parameters and -infinity parameters in math function

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.36.0
    • 1.37.0
    • core
    • None

    Description

      log10('-Infinity'); 
      log2('-Infinity'); 
      power('Infinity',2)

      As above, using the + infinity function in some math functions will report an error in calcite, but mysql and posgtres will not report an error. I think the + infinity parameter is meaningful in mathematics.

      --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)
         

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            caicancai Caican Cai

            Dates

              Created:
              Updated:

              Slack

                Issue deployment