Plz help me to understand is it a bug ?
From standard:
6.18 <string value function>
...cut...
<fold> ::= { UPPER | LOWER } <left paren> <character value expression> <right paren>

6)If <fold> is specified, then:
a) The declared type of the result of <fold> is the declared type of the !!!<character value expression>!!!.

thus i expect that return type from: SELECT UPPER(null) will be VARCHAR
but calcite show :
SqlValidatorTest

  @Test void testTypeOfUpper() {
    sql("SELECT UPPER(NULL)")
        .columnType("???");
  }

Expected: is "???"
     but: was "NULL"

I think it need to be fixed ?

Thanks !

Reply via email to