Uploaded image for project: 'Apache AsterixDB'
  1. Apache AsterixDB
  2. ASTERIXDB-2564

Too many objects created in min() and max()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.4
    • Fix Version/s: 0.9.5
    • Component/s: RT - Runtime
    • Labels:
      None

      Description

      min() and max() functions create a new comparator when switching to new aggregation type. That is when they encounter a double and the previous input values were int. The logic checks if the promotion is possible and then switch. By definition, double -> double promotion is always possible (calling canPromote(double, double) will always return true). This will lead to "switching" aggregation type and creating a new comparator with every tuple even though switching here is not necessary since double and double are the same types.

        Attachments

          Activity

            People

            • Assignee:
              alsuliman Ali Alsuliman
              Reporter:
              alsuliman Ali Alsuliman
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: