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

Use Null to replace the results of some Math functions that return NaN.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Later
    • 1.36.0
    • 1.37.0
    • core
    • None

    Description

      Among Calcite's Math functions, there are some functions that return double types. They are calculated using Java's Math method in SqlFunctions, so when the result is empty, NaN will be returned, but according to SQL rules, NULL should be returned.

      e.g

      f.checkScalarApprox("sqrt(-1)", "DOUBLE NOT NULL",
          "NaN"); 

      Attachments

        Activity

          People

            Unassigned Unassigned
            caicancai Caican Cai
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: