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

Major aggregation factory and completeness cleanup #1903

Merged
merged 44 commits into from
Feb 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
94a5b81
Address a typo in JavaDoc.
rcaudy Dec 7, 2021
7fd696a
WIP on cleanup
rcaudy Dec 8, 2021
2bd23d4
Add missing AggSpecUnique options.
rcaudy Dec 9, 2021
123306c
First cut of AggregationProcessor. Complete but-for rollups and a few…
rcaudy Dec 10, 2021
0b3758e
Rename "normal" aggs to "column" aggs.
rcaudy Dec 10, 2021
4ad5c14
Add First/LastRowKey aggs.
rcaudy Dec 10, 2021
e551c72
Duplication checks in AggregationProcessor
rcaudy Dec 10, 2021
696bf01
Cleanups for AggUnique
rcaudy Dec 10, 2021
5352361
Introduce engine-internal rollup-specific Aggregations.
rcaudy Dec 10, 2021
5556adb
Delete some unused imports in RowSetFactory
rcaudy Jan 14, 2022
f652d3a
Broken WIP on rollup support in AggregationProcessor
rcaudy Jan 14, 2022
52bec99
More WIP on Agg Processor for Rollups.
rcaudy Jan 25, 2022
8a2322e
Plumbed most of rollup base level.
rcaudy Jan 25, 2022
2108813
AggregationProcessor handles all cases now
rcaudy Jan 26, 2022
2849e65
WIP on integration
rcaudy Jan 26, 2022
d3f2331
Tons of progress on gluing it all together. Description support for a…
rcaudy Jan 27, 2022
c7bbfe4
Lots more integration. Need to do ApproximatePercentile now.
rcaudy Jan 28, 2022
0e22f00
Re-name some stuff.
rcaudy Jan 28, 2022
4972054
Delete extra whitespace.
rcaudy Jan 28, 2022
171b5f4
WIP on ApproximatePercentile
rcaudy Jan 28, 2022
29eca75
Finished refactor of ApproximatePercentile
rcaudy Jan 29, 2022
b614518
Some build fixes and cleanups.
rcaudy Jan 29, 2022
929e219
Commit previously missing file.
rcaudy Jan 29, 2022
4b1060b
Three more fixes for compilation.
rcaudy Jan 29, 2022
ddaa05a
Delete many legacy files.
rcaudy Jan 29, 2022
1fc88ed
Replicate + spotless + doc regen
rcaudy Jan 29, 2022
d26a43e
Fixup build issue for reflective replication
rcaudy Jan 29, 2022
781b5c1
Delete non-operator by aggregation code
rcaudy Jan 29, 2022
38a8d24
Freeze-by support
rcaudy Jan 29, 2022
eeaf4ac
Delete more aggregation factories.
rcaudy Jan 29, 2022
bc20d87
replication + spotless + generation
rcaudy Jan 29, 2022
59e08de
Fix unit tests
rcaudy Jan 31, 2022
3468d77
spotless + generate
rcaudy Jan 31, 2022
4b85ee7
Fix mod-detection off-by-one in TDigestPercentileOperator
rcaudy Jan 31, 2022
ba91e2c
Clean up some AggregationFactory remnants in Python
rcaudy Jan 31, 2022
6adf0c7
Re-run json doc generation.
rcaudy Jan 31, 2022
d8cea59
Re-order AggSpecs in Visitor to alphabetize them correctly, and add a…
rcaudy Feb 1, 2022
a5230bd
Re-write numeric compatibility testing and conversion code for AggUni…
rcaudy Feb 2, 2022
a02e95e
WIP on JavaDoc improvements
rcaudy Feb 2, 2022
5363fdd
Spotless
rcaudy Feb 2, 2022
7b0269b
Further WIP on JavaDoc
rcaudy Feb 2, 2022
de632c7
Rename "averageMedian" to "averageEvenlyDivided"
rcaudy Feb 3, 2022
8c92011
Finish JavaDoc cleanup
rcaudy Feb 3, 2022
ed5dffb
Spotless, replication, and docs
rcaudy Feb 3, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
323 changes: 77 additions & 246 deletions ClientSupport/src/main/java/io/deephaven/treetable/RollupDefinition.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

import io.deephaven.base.verify.Require;
import io.deephaven.engine.table.Table;
import io.deephaven.engine.table.impl.QueryTable;
import io.deephaven.engine.updategraph.NotificationQueue;
import io.deephaven.engine.table.MatchPair;
import io.deephaven.engine.util.string.StringUtils;
Expand Down Expand Up @@ -162,7 +161,7 @@ private HierarchicalTable applyFilters(@NotNull HierarchicalTable table) {

final Table source = Require.neqNull(table.getSourceTable(), "Hierarchical source table");
final RollupInfo info = getInfo();
return (HierarchicalTable) ((QueryTable) source.where(filters)).rollup(info.factory,
return (HierarchicalTable) source.where(filters).rollup(info.aggregations,
info.getLeafType() == RollupInfo.LeafType.Constituent, info.getSelectColumns());
}

Expand Down
2 changes: 0 additions & 2 deletions Generators/Generators.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,6 @@ def pythonStaticMethodsArgs = ['io.deephaven.time.calendar.Calendars',
'io.deephaven.engine.util.TableTools',
'/Generators/src/main/java/io/deephaven/pythonPreambles/TableToolsPreamble.txt',
'/Integrations/python/deephaven/TableTools/__init__.py',
'io.deephaven.engine.table.impl.by.AggregationFactory',
'/Integrations/python/deephaven/AggregationFactory/__init__.py',
'io.deephaven.plot.colors.ColorMaps',
'/Integrations/python/deephaven/Plot/ColorMaps/__init__.py',
'io.deephaven.engine.util.WindowCheck',
Expand Down
474 changes: 0 additions & 474 deletions Integrations/python/deephaven/AggregationFactory/__init__.py

This file was deleted.

6 changes: 1 addition & 5 deletions Integrations/python/deephaven/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@

* Calendars imported as cals

* AggregationFactory imported as af

* DateTimeUtils imported as dtu

* MovingAverages imported as mavg
Expand Down Expand Up @@ -58,7 +56,7 @@
'Aggregation', 'ColumnName', 'ColumnRenderersBuilder', 'DistinctFormatter', 'DownsampledWhereFilter', 'DynamicTableWriter',
'LayoutHintBuilder', 'Replayer', 'SmartKey', 'SortColumn', 'TotalsTableBuilder', 'WindowCheck', # from TableManipulation

"cals", "af", "dtu", "figw", "mavg", "plt", "pt", "ttools", "tloggers", # subpackages with abbreviated names
"cals", "dtu", "figw", "mavg", "plt", "pt", "ttools", "tloggers", # subpackages with abbreviated names

"read_csv", "write_csv" # from csv
]
Expand All @@ -81,7 +79,6 @@


from . import Calendars as cals, \
AggregationFactory as af, \
DateTimeUtils as dtu, \
MovingAverages as mavg, \
ConsumeKafka as ck, \
Expand All @@ -107,7 +104,6 @@ def initialize():

# ensure that all the symbols are called and reimport the broken symbols
cals._defineSymbols()
af._defineSymbols()
dtu._defineSymbols()
dh._defineSymbols()
ck._defineSymbols()
Expand Down

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"className": "io.deephaven.api.agg.Aggregation$Visitor",
"methods": {
"visit": "*Overload 1* \n :param count: io.deephaven.api.agg.Count\n \n*Overload 2* \n :param normalAgg: io.deephaven.api.agg.NormalAggregation\n \n*Overload 3* \n :param normalAggs: io.deephaven.api.agg.NormalAggregations"
"visit": "**Incompatible overloads text - text from the first overload:**\n\nVisit a column aggregation.\n\n*Overload 1* \n :param aggregations: (io.deephaven.api.agg.Aggregations) - The compound aggregation to visit\n \n*Overload 2* \n :param columnAgg: (io.deephaven.api.agg.ColumnAggregation) - The column aggregation to visit\n \n*Overload 3* \n :param columnAggs: (io.deephaven.api.agg.ColumnAggregations) - The compound column aggregation to visit\n \n*Overload 4* \n :param count: (io.deephaven.api.agg.Count) - The count aggregation\n \n*Overload 5* \n :param firstRowKey: (io.deephaven.api.agg.FirstRowKey) - The first row key aggregation\n \n*Overload 6* \n :param lastRowKey: (io.deephaven.api.agg.LastRowKey) - The last row key aggregation"
},
"path": "io.deephaven.api.agg.Aggregation.Visitor",
"text": "Visitor interface. Combines with Aggregation.walk(Visitor) in order to allow for type-safe Aggregation evaluation\n without switch statements or if-else blocks.",
"typeName": "interface"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"className": "io.deephaven.api.agg.AggregationDescriptions",
"methods": {
"of": "*Overload 1* \n :param aggregation: io.deephaven.api.agg.Aggregation\n :return: java.util.Map<java.lang.String,java.lang.String>\n \n*Overload 2* \n :param aggregations: java.util.Collection<? extendsio.deephaven.api.agg.Aggregation>\n :return: java.util.Map<java.lang.String,java.lang.String>",
"visit": "**Incompatible overloads text - text from the first overload:**\n\nVisit a column aggregation.\n\n*Overload 1* \n :param aggregations: (io.deephaven.api.agg.Aggregations) - The compound aggregation to visit\n \n*Overload 2* \n :param columnAgg: (io.deephaven.api.agg.ColumnAggregation) - The column aggregation to visit\n \n*Overload 3* \n :param columnAggs: (io.deephaven.api.agg.ColumnAggregations) - The compound column aggregation to visit\n \n*Overload 4* \n :param count: (io.deephaven.api.agg.Count) - The count aggregation\n \n*Overload 5* \n :param firstRowKey: (io.deephaven.api.agg.FirstRowKey) - The first row key aggregation\n \n*Overload 6* \n :param lastRowKey: (io.deephaven.api.agg.LastRowKey) - The last row key aggregation"
},
"path": "io.deephaven.api.agg.AggregationDescriptions",
"text": "A visitor to describe the input and aggregation column name pairs for aggregations.",
"typeName": "class"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
"methods": {
"build": ":return: java.util.List<io.deephaven.api.agg.Aggregation>",
"of": "Optimizes a collection of aggregations by grouping like-specced aggregations together. The\n input order will be preserved based on the spec-encountered order.\n\n:param aggregations: (java.util.Collection<? extendsio.deephaven.api.agg.Aggregation>) - the aggregations\n:return: (java.util.List<io.deephaven.api.agg.Aggregation>) the optimized aggregations",
"visit": "*Overload 1* \n :param count: io.deephaven.api.agg.Count\n \n*Overload 2* \n :param normalAgg: io.deephaven.api.agg.NormalAggregation\n \n*Overload 3* \n :param normalAggs: io.deephaven.api.agg.NormalAggregations"
"visit": "**Incompatible overloads text - text from the first overload:**\n\nVisit a column aggregation.\n\n*Overload 1* \n :param aggregations: (io.deephaven.api.agg.Aggregations) - The compound aggregation to visit\n \n*Overload 2* \n :param columnAgg: (io.deephaven.api.agg.ColumnAggregation) - The column aggregation to visit\n \n*Overload 3* \n :param columnAggs: (io.deephaven.api.agg.ColumnAggregations) - The compound column aggregation to visit\n \n*Overload 4* \n :param count: (io.deephaven.api.agg.Count) - The count aggregation\n \n*Overload 5* \n :param firstRowKey: (io.deephaven.api.agg.FirstRowKey) - The first row key aggregation\n \n*Overload 6* \n :param lastRowKey: (io.deephaven.api.agg.LastRowKey) - The last row key aggregation"
},
"path": "io.deephaven.api.agg.AggregationOptimizer",
"text": "Optimizes a collection of aggregations by grouping like-speccedd aggregations together.",
"text": "Optimizes a collection of aggregations by grouping like-specced aggregations together.",
"typeName": "class"
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"className": "io.deephaven.api.agg.AggregationPairs",
"methods": {
"of": "*Overload 1* \n :param aggregation: io.deephaven.api.agg.Aggregation\n :return: java.util.stream.Stream<io.deephaven.api.agg.Pair>\n \n*Overload 2* \n :param aggregations: java.util.Collection<? extendsio.deephaven.api.agg.Aggregation>\n :return: java.util.stream.Stream<io.deephaven.api.agg.Pair>",
"outputsOf": "*Overload 1* \n :param aggregation: io.deephaven.api.agg.Aggregation\n :return: java.util.stream.Stream<io.deephaven.api.ColumnName>\n \n*Overload 2* \n :param aggregations: java.util.Collection<? extendsio.deephaven.api.agg.Aggregation>\n :return: java.util.stream.Stream<io.deephaven.api.ColumnName>",
"visit": "**Incompatible overloads text - text from the first overload:**\n\nVisit a column aggregation.\n\n*Overload 1* \n :param aggregations: (io.deephaven.api.agg.Aggregations) - The compound aggregation to visit\n \n*Overload 2* \n :param columnAgg: (io.deephaven.api.agg.ColumnAggregation) - The column aggregation to visit\n \n*Overload 3* \n :param columnAggs: (io.deephaven.api.agg.ColumnAggregations) - The compound column aggregation to visit\n \n*Overload 4* \n :param count: (io.deephaven.api.agg.Count) - The count aggregation\n \n*Overload 5* \n :param firstRowKey: (io.deephaven.api.agg.FirstRowKey) - The first row key aggregation\n \n*Overload 6* \n :param lastRowKey: (io.deephaven.api.agg.LastRowKey) - The last row key aggregation"
},
"path": "io.deephaven.api.agg.AggregationPairs",
"text": "A visitor to get the ordered input/output column name pairs for aggregations.",
"typeName": "class"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"className": "io.deephaven.api.agg.Aggregations",
"methods": {
"aggregations": ":return: java.util.List<io.deephaven.api.agg.Aggregation>",
"builder": ":return: io.deephaven.api.agg.Aggregations.Builder",
"walk": "Glue method to deliver this Aggregation to a AggSpec.Visitor.\n\nNote: Java generics information - <V extends io.deephaven.api.agg.Aggregation.Visitor>\n\n:param visitor: (V) - The visitor\n:return: (V) The visitor"
},
"path": "io.deephaven.api.agg.Aggregations",
"text": "Aggregations is an Aggregation that is a collection of two or more aggregations.",
"typeName": "class"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"className": "io.deephaven.api.agg.Aggregations$Builder",
"methods": {
"addAggregations": "*Overload 1* \n :param aggregation: io.deephaven.api.agg.Aggregation\n :return: io.deephaven.api.agg.Aggregations.Builder\n \n*Overload 2* \n :param aggregations: io.deephaven.api.agg.Aggregation...\n :return: io.deephaven.api.agg.Aggregations.Builder",
"addAllAggregations": ":param aggregations: java.lang.Iterable<? extendsio.deephaven.api.agg.Aggregation>\n:return: io.deephaven.api.agg.Aggregations.Builder",
"build": ":return: io.deephaven.api.agg.Aggregations"
},
"path": "io.deephaven.api.agg.Aggregations.Builder",
"typeName": "interface"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"className": "io.deephaven.api.agg.ColumnAggregation",
"methods": {
"of": ":param spec: io.deephaven.api.agg.spec.AggSpec\n:param pair: io.deephaven.api.agg.Pair\n:return: io.deephaven.api.agg.ColumnAggregation",
"pair": ":return: io.deephaven.api.agg.Pair",
"spec": ":return: io.deephaven.api.agg.spec.AggSpec",
"walk": "Glue method to deliver this Aggregation to a AggSpec.Visitor.\n\nNote: Java generics information - <V extends io.deephaven.api.agg.Aggregation.Visitor>\n\n:param visitor: (V) - The visitor\n:return: (V) The visitor"
},
"path": "io.deephaven.api.agg.ColumnAggregation",
"text": "A ColumnAggregation is an Aggregation that is composed of a spec and a single input/output\n column pair. The spec defines the aggregation operation to apply to the input column in order to\n produce the paired output column.",
"typeName": "class"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"className": "io.deephaven.api.agg.ColumnAggregations",
"methods": {
"builder": ":return: io.deephaven.api.agg.ColumnAggregations.Builder",
"pairs": ":return: java.util.List<io.deephaven.api.agg.Pair>",
"spec": ":return: io.deephaven.api.agg.spec.AggSpec",
"walk": "Glue method to deliver this Aggregation to a AggSpec.Visitor.\n\nNote: Java generics information - <V extends io.deephaven.api.agg.Aggregation.Visitor>\n\n:param visitor: (V) - The visitor\n:return: (V) The visitor"
},
"path": "io.deephaven.api.agg.ColumnAggregations",
"text": "ColumnAggregations is an Aggregation that is composed of a spec and multiple input/output\n column pairs. The spec defines the aggregation operation to apply to each input column in order to\n produce the paired output column.",
"typeName": "class"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"className": "io.deephaven.api.agg.ColumnAggregations$Builder",
"methods": {
"addAllPairs": ":param elements: java.lang.Iterable<? extendsio.deephaven.api.agg.Pair>\n:return: io.deephaven.api.agg.ColumnAggregations.Builder",
"addPairs": "*Overload 1* \n :param element: io.deephaven.api.agg.Pair\n :return: io.deephaven.api.agg.ColumnAggregations.Builder\n \n*Overload 2* \n :param elements: io.deephaven.api.agg.Pair...\n :return: io.deephaven.api.agg.ColumnAggregations.Builder",
"build": ":return: io.deephaven.api.agg.ColumnAggregations",
"spec": ":param spec: io.deephaven.api.agg.spec.AggSpec\n:return: io.deephaven.api.agg.ColumnAggregations.Builder"
},
"path": "io.deephaven.api.agg.ColumnAggregations.Builder",
"typeName": "interface"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@
"methods": {
"column": ":return: io.deephaven.api.ColumnName",
"of": "*Overload 1* \n :param name: io.deephaven.api.ColumnName\n :return: io.deephaven.api.agg.Count\n \n*Overload 2* \n :param x: java.lang.String\n :return: io.deephaven.api.agg.Count",
"walk": "Note: Java generics information - <V extends io.deephaven.api.agg.Aggregation.Visitor>\n\n:param visitor: V\n:return: V"
"walk": "Glue method to deliver this Aggregation to a AggSpec.Visitor.\n\nNote: Java generics information - <V extends io.deephaven.api.agg.Aggregation.Visitor>\n\n:param visitor: (V) - The visitor\n:return: (V) The visitor"
},
"path": "io.deephaven.api.agg.Count",
"text": "An aggregation that provides a single output column with the number of rows in each aggregation\n group.",
"typeName": "class"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"className": "io.deephaven.api.agg.FirstRowKey",
"methods": {
"column": ":return: io.deephaven.api.ColumnName",
"of": "*Overload 1* \n :param name: io.deephaven.api.ColumnName\n :return: io.deephaven.api.agg.FirstRowKey\n \n*Overload 2* \n :param x: java.lang.String\n :return: io.deephaven.api.agg.FirstRowKey",
"walk": "Glue method to deliver this Aggregation to a AggSpec.Visitor.\n\nNote: Java generics information - <V extends io.deephaven.api.agg.Aggregation.Visitor>\n\n:param visitor: (V) - The visitor\n:return: (V) The visitor"
},
"path": "io.deephaven.api.agg.FirstRowKey",
"text": "An aggregation that provides a single output column with the first row key from the input table\n for each aggregation group in the result.\n \n The primary use case for this aggregation is to allow for a subsequent sort on the output column to order aggregated data by current first occurrence in the input table rather than\n encounter order.",
"typeName": "class"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"className": "io.deephaven.api.agg.LastRowKey",
"methods": {
"column": ":return: io.deephaven.api.ColumnName",
"of": "*Overload 1* \n :param name: io.deephaven.api.ColumnName\n :return: io.deephaven.api.agg.LastRowKey\n \n*Overload 2* \n :param x: java.lang.String\n :return: io.deephaven.api.agg.LastRowKey",
"walk": "Glue method to deliver this Aggregation to a AggSpec.Visitor.\n\nNote: Java generics information - <V extends io.deephaven.api.agg.Aggregation.Visitor>\n\n:param visitor: (V) - The visitor\n:return: (V) The visitor"
},
"path": "io.deephaven.api.agg.LastRowKey",
"text": "An aggregation that provides a single output column with the last row key from the input table\n for each aggregation group in the result.\n \n The primary use case for this aggregation is to allow for a subsequent sort on the output column to order aggregated data by current last occurrence in the input table rather than\n encounter order.",
"typeName": "class"
}

This file was deleted.

This file was deleted.

This file was deleted.

Loading