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

Support aggregation functions on DECIMAL in DruidAdapter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.12.0
    • 1.12.0
    • druid-adapter
    • 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

              jcamacho Jesús Camacho Rodríguez
              jcamacho Jesús Camacho Rodríguez
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: