$derivative should error when sortBy is unexpected type

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 5.0.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Minor Change
    • Query Optimization 2021-05-03, Query Optimization 2021-05-17
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      When the sortBy field is a date, $derivative requires an outputUnit so it can convert a 1/time quantity to a unitless value. Conversely, when the sortBy field is unitless, $derivative requires outputUnit to be omitted.

      In both cases, we should throw an error instead of returning null. That should make it clearer how to fix a query where the presence/absence of 'outputUnit' doesn't match the data.

            Assignee:
            David Percy (Inactive)
            Reporter:
            David Percy (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: