fdb-record-layer icon indicating copy to clipboard operation
fdb-record-layer copied to clipboard

Resolves #1424: Add count and countNonNull to streaming aggregate

Open ohadzeliger opened this issue 3 years ago • 9 comments

Add support and tests for count and countNonNull: #1424. Specifically, the following are true for aggregations and counts:

  1. Zero records aggregate to NULL (e.g. Sum() and Avg() without any records return null).
  2. Exception to the rule above is Count, where: 2.1. count() with no aggregation criteria and no records is 0. 2.2. count() with some aggregation criteria and no records returns empty stream. (Same as SQL).
  3. Empty table (no records at all ) returns empty result (no records).
  4. All aggregations ignore null values: They are considered a no-op for avg(), sum() etc.
  5. Exception to the above rule is Count where count() with will include null values.
  6. In order to exclude null records from the count, use the countNonNull() aggregation.

ohadzeliger avatar Oct 11 '21 18:10 ohadzeliger

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: fdb-record-layer-pull-request-build-proto2
  • Commit ID: 9b8cd4f26c14299e65330d5f253d994f5ccba5c3
  • Result: FAILED
  • Error: Unexpected EC2 error: RequestLimitExceeded
  • Build Logs (available for 30 days)

foundationdb-ci avatar Oct 11 '21 18:10 foundationdb-ci

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: fdb-record-layer-pull-request-build-proto3
  • Commit ID: 9b8cd4f26c14299e65330d5f253d994f5ccba5c3
  • Result: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

foundationdb-ci avatar Oct 11 '21 18:10 foundationdb-ci

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: fdb-record-layer-pull-request-build-proto2
  • Commit ID: 9b8cd4f26c14299e65330d5f253d994f5ccba5c3
  • Result: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

foundationdb-ci avatar Oct 11 '21 19:10 foundationdb-ci

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: fdb-record-layer-pull-request-build-proto2
  • Commit ID: 9b51f5a6c18417deb7a41b0e132d51e33344fa09
  • Result: FAILED
  • Error: Error while executing command: ./gradlew --console=plain -b ./build.gradle build destructiveTest sonarqube -PcoreNotStrict -PreleaseBuild=false -PpublishBuild=false -PspotbugsEnableHtmlReport. Reason: exit status 1
  • Build Logs (available for 30 days)

foundationdb-ci avatar Oct 11 '21 20:10 foundationdb-ci

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: fdb-record-layer-pull-request-build-proto3
  • Commit ID: 9b51f5a6c18417deb7a41b0e132d51e33344fa09
  • Result: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

foundationdb-ci avatar Oct 11 '21 20:10 foundationdb-ci

test this please

ohadzeliger avatar Oct 11 '21 20:10 ohadzeliger

test this please

ohadzeliger avatar Oct 11 '21 21:10 ohadzeliger

AWS CodeBuild CI Report for Linux CentOS 7

  • CodeBuild project: fdb-record-layer-pull-request-build-proto2
  • Commit ID: 9b51f5a6c18417deb7a41b0e132d51e33344fa09
  • Result: SUCCEEDED
  • Error: N/A
  • Build Logs (available for 30 days)

foundationdb-ci avatar Oct 11 '21 22:10 foundationdb-ci

Closing as this is handled by other changes.

ohadzeliger avatar Oct 26 '22 13:10 ohadzeliger