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

Avg function should infer correct data type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • 1.35.0
    • core
    • None

    Description

      Currently,when the avg input is int type,the return type is int type, but the correct type is float

      RelDataTypeSystemImpl

      // code placeholder
      @Override public RelDataType deriveAvgAggType(RelDataTypeFactory typeFactory,
          RelDataType argumentType) {
        return argumentType;
      } 

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              loganzheng logan.zheng
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: