Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds missing Float and String aggregators #86

Merged
merged 2 commits into from
Jan 18, 2020

Conversation

anskarl
Copy link
Contributor

@anskarl anskarl commented Jan 12, 2020

  • Float-based: FloatSum, FloatMin, FloatMax, FloatFirst and FloatLast
  • String-based: StringFirst and StringLast
  • Updates the corresponding DQL operators
  • Adds two missing DQL operator functions for Javascript aggregator (same arguments, but without requiring to specify an aggregator name).

  - Float-based: FloatSum, FloatMin, FloatMax, FloatFirst and FloatLast
  - String-based: StringFirst and StringLast
  - Updates the corresponding DQL operators
  - Adds two missing DQL operator functions for Javascript aggregator without requiring name.
Copy link
Contributor

@barend barend left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oncemore: thank you for this PR.

docs/dql.md Outdated
@@ -397,6 +397,16 @@ d"dim_name".longFirst as "agg_first"
doubleLast(d"dim_name") as "agg_last"
```

`stringFirst` computes the metric value with the minimum timestamp or `null` if no row exist.
`stringLast` computes the metric value with the maximum timestamp or `null` if no row exist.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"if no row exist" → "if no row exists"

override def getName: String = name.getOrElse(s"string_first_${fieldName}")

def maxStringBytes(v: Int): StringFirstAgg = {
require(v > 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add an exception message to the requirement, otherwise it's just "requirement failed".

@bjgbeelen bjgbeelen self-requested a review January 17, 2020 12:35
@barend
Copy link
Contributor

barend commented Jan 18, 2020

Thank you for updating the PR. I have no further remarks

@krisgeus krisgeus merged commit f1b7f36 into ing-bank:master Jan 18, 2020
@anskarl anskarl mentioned this pull request May 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants