OLAP library Release Notes PivotData Documentation


Version 1.4.2 (latest) 2023 Feb 02

  • PivotTable now skips Key.Empty keys when calculates ColumnKeys/RowKeys (github issue #11)

Version 1.4.1 2022 Jun 13

  • AverageAggregator (and SumAggregator) now returns null instead of zero if count=0 (like SQL AVG/SUM), issue #9

Version 1.4.0 2022 Jun 13

  • Added netstandard2.1 build
  • Added PivotData.ProcessDataAsync methods (available only in netstandard2.1 build)

Version 1.3.8 2020 May 27

  • NReco.PivotData goes open source: https://github.com/nreco/pivotdata
  • PivotTable class: fixed issue with sort-by-value for single-measure that is FormulaAggregator, fixed issue with sort-by-value when aggregator value is IList (ListAggregator, ListUniqueAggregator), added ability to set custom IComparer for values (ValuesComparer property)
  • PivotData class: fixed issue in ValueKey comparison for numeric dimension keys (cases like int vs long)

Version 1.3.7 2018 Jul 18

  • fixed PivotDataState serialization issue with Key.Empty
  • PivotData class: XOR-based hash function for keys replaced with sum-based to avoid collisions
  • performance optimization: less array allocations in PivotData.ProcessData method and PivotTable class

Version 1.3.6 2018 Apr 06

  • added ModeAggregator to calculate value that appears most often.
  • fixed PivotTable class issue with slow sub-totals calculation in some cases
  • always use InvariantCulture for numbers parsing

Version 1.3.5 2018 Feb 26

  • added QuantileAggregator to calculate specified quantile (median).
  • added PivotData.LazyAdd property (affects behaviour when non-existing key is accessed) - added netstandard2.0 build
  • efficient sub-totals calculation in PivotTable class (especially for large pivot tables)
  • now PivotData class correctly loads PivotDataState which has duplicate key entries

Version 1.3.4 2017 Feb 01

  • added SliceQuery.Measure overload that gives keys context for measure value calculation. Useful in cases when formula result depends on the key (for example, calculate yearly growth).
  • added PivotData.ProcessData overload that can accept another IPivotData instance as input. Useful for multi-stage calculation when one pivot table is calculated by results of another one.

Version 1.3.3 2016 Oct 18

  • added FormulaAggregator (based on CompositeAggregator) for on-the-fly formula calculations
  • added SliceQuery.Measure overload for defining formula-based measure
  • minor fix in MaxAggregator/MinAggregator Merge method (extra check for null)

Version 1.3.2 2016 Aug 14

  • improved performance for SliceQuery.Where(string,object[])
  • now PivotDataState Serialize/Deserialize methods are available in netstandard1.5 build
  • ListAggregator/ListAggregatorFactory can accept field name to collect field values instead of source objects
  • now MinAggregator/MaxAggregator may be used with any IComparable values, not only with numeric types

Version 1.3.1 2016 Jul 05

  • Fixed issue with incorrect grand-total non-lazy calculation for PivotData cube with exactly one dimension
  • Improved internal performance for PivotData lazy totals calculation (1.5x)
  • Drastically increased performance for PivotTable row/column totals calculation (10x+)
  • Added build for .NET Standards 1.5 (now PivotData can be used from .NET Core 1.0 apps)

Version 1.3.0 2016 May 10

  • Bugfix: PivotTable.PreserveGroupOrder works incorrectly for the last column/row.
  • Added ListAggregatorFactory (ListAggregator) for accumulating all values from an input source (works like LINQ GroupBy).
  • Added VarianceAggregatorFactory (VarianceAggregator) for calculating variance, standard deviation (stdev), sample variance and sample standard deviation.
  • Added ObjectMember that simplifies processing of custom data models (typed collections).
  • Added PivotDataHelper that provides utility methods for any IPivotData object: GetDimensionKeys and GetDimensionType.
  • Improved ConvertHelper.ConvertToDecimal method (now it supports all primitive number types) and added ConvertHelper.ConvertToDouble method.

Version 1.2.6 2016 Feb 04


Version 1.2.5 2016 Jan 13

  • Fixed PivotTable issue when the same dimension is used for both rows and columns (should be diagonal matrix result).
  • New IAggregator.AsComposite() extension method avoids boilerplate code (cast to CompositeAggregator) for accessing PivotData or PivotTable with several measures.
  • Added QueryCube example that illustrates how to use SliceQuery to filter/slice/dice, define derived (calculated) dimensions and measures.

Version 1.2.4 2015 Dec 11

  • Added PivotTable.PreserveGroupOrder option: when enabled sort by value reorders rows/columns only inside groups.
  • now PivotData works in lazy totals mode by default (this is backward-compatible change)
  • added SortAsComparer for defining explicit order of pivot table rows or columns
  • fixed NaturalSortKeyComparer (exception when dimension contains mixed types). In this case it fallbacks to comparison of string equivalents.
  • added NaturalSortKeyComparer.ReverseInstance

Version 1.2.3 2015 Sep 30

  • moved SliceQuery from extensions (PivotData Toolkit) to NReco.PivotData assembly. SliceQuery can be used for querying data cube in linq-style.
  • PivotTable class: added PivotData property for accessing underlying data cube, added SortRowKeys/SortColumnKeys overloads for specifying measure index (for pivot tables with several measures)
  • Overloaded ToString in IAggregatorFactory implementations (used for getting human-readable measure names)
  • now NReco.PivotData.dll is a signed (strongly named) assembly

Version 1.2.2 2015 July 27

  • added PivotData.CopyTo for custom merge/slice cube operations
  • added PivotTableMD class for creating n-dimensional (n>2) pivot table views
  • added overloads for PivotData/PivotTable that accept custom comparers of dimension keys
  • changed LazyTotals mode behaviour: now accessing grand-total value doesn't force calculation of all sub-totals (reason out-of-memory exception for large cubes)
  • a lot of other minor changes/fixes
  • introduced IPivotData interface
  • improved PivotData performance and decreased memory consumption

Version 1.2.0 2015 May 26

  • fixed issue with PivotData.Merge behavior (totals)
  • fixed issue with PivotData.ProcessData in lazy totals mode
  • added fast Serialize/Deserialize methods for PivotDataState
  • added Slice method for PivotData (reduce dimensions / filter data)
  • significantly improved performance and decreased memory consumption (Key class is no longer used for wrapping key objects)
  • added CsvDemo example (aggregates data from csv file)

Version 1.1.0 2015 Apr 10

  • dimension keys are sorted by default
  • added lazy totals calculation mode
  • added CompositeAggregator (enables ability to use several aggregators at once)
  • now PivotData dimensions are determined by single key
  • added PivotTable 2D view (slice) for PivotData. Supports: several dimensions for table rows/columns, sort row/columns by table values.

Version 1.0.1 2015 Mar 09

  • added serializable PivotDataState + save/load routines
  • added min/max aggregators (MinAggregatorFactory and MaxAggregatorFactory)

Version 1.0.0 2015 Feb 11

Initial PivotData library release. Implemented core features:
  • optimized totals calculation in batch processing model
  • merge operation for map/reduce usage scenario (parallel/distributed cube calculation)
  • basic set of aggregators: avg, count, count uniq / list uniq