ActivePivot

ActivePivot

  • Developer Documentation
  • Versions
  • Help

›CoPPer

Information⌃

  • What's new in ActivePivot
  • Changelog
  • Migration notes

CoPPer⌃

  • Introduction
  • The API
  • Flat and Multi-Dimensional Representations
  • Examples
  • Presentation Meta Data
  • Arithmetic Operations and Edge Cases
  • Advanced Topics

Copper 2⌃

  • Introduction
  • API
  • Measures
  • Hierarchies
  • Publication
  • Join operations

ActivePivot WebSocket API⌃

  • Operation description
  • Payload definition

JDBC Source⌃

  • Introduction
  • Source configuration

MDX language⌃

  • MDX Functions

ActivePivot Properties⌃

  • ActivePivot Properties

Arithmetic Operations and Edge Cases

The advantage of the arithmetical operators like .plus(), .minus(), .multiply() etc... is that they handle for you the different types that can be in the data in an efficient way, and they help CoPPer understand your business logic so that it can optimize it.

Their behavior is straight-forward based on their name, but we have to explain what happens in the edge cases: when an operand is null or equal to zero for instance:

Operationa is nullb is nullb is zero
a.plus(b)returns nullreturns nullreturns a
a.minus(b)returns nullreturns nullreturns a
a.multiply(b)returns nullreturns nullreturns 0
a.divide(b)returns nullreturns nullThrows an ArithmeticException at query time

Which can be summarized by: Even in CoPPer, never divide by zero, otherwise if any operand is missing we return null.

← Presentation Meta DataAdvanced Topics →
ActivePivot
Docs
Getting StartedWikiAPI Reference
Community
Stack OverflowLinkedinTwitter
More
Blog
Copyright © 2019 ActiveViam