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

Fix return type of item operator when operand type is not known

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.0-incubating
    • Component/s: None
    • Labels:
      None

      Description

      While inferring the return type of the item operator (SqlItemOperator. inferReturnType()) when the SqlTypeName of the operand is ANY we set the nullability of return type to be false. Since the type of the operand is not known at this point we cannot know the return type and its nullability.

      Setting nullability to false was causing wrong results in Drill when we were performing count(item op), Calcite would set nullability to be false and the count(item op) would get replaced with count(0) causing wrong results if the column is eventually resolved to be nullable and has nulls in it.

        Attachments

          Activity

            People

            • Assignee:
              mehant Mehant Baid
              Reporter:
              mehant Mehant Baid
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: