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

Support aggregation functions on DECIMAL in DruidAdapter

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.12.0
    • Fix Version/s: 1.12.0
    • Component/s: druid
    • Labels:
      None

      Description

      Currently, whether to use fractional or integer aggregations is based on following code (L699 in DruidQuery.java).

      final boolean b = aggCall.getType().getSqlTypeName() == SqlTypeName.DOUBLE;
      

      Since Hive might use other fractional types for the aggregation, we might end up using the wrong type of aggregation in Druid. We could extend the check as follows:

      final boolean b = SqlTypeName.FRACTIONAL_TYPES.contains(aggCall.getType().getSqlTypeName());
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                jcamachorodriguez Jesus Camacho Rodriguez
                Reporter:
                jcamachorodriguez Jesus Camacho Rodriguez
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: