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

CONCAT2 function (enabled in Oracle library) gets wrong result when one of the arguments is NULL

    XMLWordPrintableJSON

Details

    Description

      Tested CONCAT function in Oracle and got the corresponding results.

      select concat('a', cast(null as varchar(20))) from DUAL;
      --- results in 'a'
      
      select concat('a', null) from DUAL;
      select 'a' ||  null from DUAL;
      --- both result in 'a'
      

      In Calcite(see checkConcat2Func() in SqlOperatorTest.java), CONCAT2 function gets null when running:

      concat('a', cast(null as varchar))
      

      Attachments

        Issue Links

          Activity

            People

              VAE ZheHu
              VAE ZheHu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: