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

SQL ANY type should be nullable

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.2.0-incubating
    • None
    • None

    Description

      Calcite uses SQL "any" type internally, when the type of an Rex expression is not known precisely. By its name, "any" could mean nullable type, or non-nullable type. Therefore, it makes sense to create SQL "any" type as nullable type.

      However, in the Calcite code, the nullability of "any" type is not set consistently. For example, the SqlItemOperator would set "any" as nullable, while SqlUnresolvedFunction will set "any" as non-nullable.

      SQL "any" type is used extensively in Schema-less system like Drill, since the exact SQL type would be determined in run-time only. Having an inconsistent nullability through Calcite library will cause issues for a schema-less system.

      Attachments

        Activity

          People

            julianhyde Julian Hyde
            jni Jinfeng Ni
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: