Skip to content

Add BIG_SUM SQL function#13102

Merged
cheddar merged 1 commit intoapache:masterfrom
rash67:cbd-sql
Sep 27, 2022
Merged

Add BIG_SUM SQL function#13102
cheddar merged 1 commit intoapache:masterfrom
rash67:cbd-sql

Conversation

@rash67
Copy link
Contributor

@rash67 rash67 commented Sep 16, 2022

Description

This adds a sql function, "BIG_SUM", that uses CompressedBigDecimal to do a sum. Other misc changes:

  1. handle NumberFormatExceptions when parsing a string (default to set
    to 0, configurable in agg factory to be strict and throw on error)
  2. format pom file (whitespace) + add dependency
  3. scaleUp -> scale and always require scale as a parameter

Key changed/added classes in this PR
  • CompressedBigDecimalSqlAggregator - sql function definitions and arg parsing

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

@rash67
Copy link
Contributor Author

rash67 commented Sep 16, 2022

ugh, this should be stacked on #13086
ignore first commit

@rash67 rash67 force-pushed the cbd-sql branch 7 times, most recently from bb3b903 to adb8c74 Compare September 22, 2022 18:00
This adds a sql function, "BIG_SUM", that uses
CompressedBigDecimal to do a sum. Other misc changes:

1. handle NumberFormatExceptions when parsing a string (default to set
   to 0, configurable in agg factory to be strict and throw on error)
2. format pom file (whitespace) + add dependency
3. scaleUp -> scale and always require scale as a parameter
@cheddar cheddar merged commit 28b9edc into apache:master Sep 27, 2022
@2bethere
Copy link
Contributor

I realized this one has no docs attached. Can you help describe what is now possible that weren't possible before with BIG_SUM so that we can include this in the release notes? cc' @317brian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants