diff --git a/Integrations/python/deephaven/TableManipulation/__init__.py b/Integrations/python/deephaven/TableManipulation/__init__.py index 8e3a53bc06a..3a25db834b6 100644 --- a/Integrations/python/deephaven/TableManipulation/__init__.py +++ b/Integrations/python/deephaven/TableManipulation/__init__.py @@ -13,6 +13,7 @@ # None until the first successful _defineSymbols() call Aggregation = None #: Class to supply helpers for constructing aggregations +ColumnName = None #: Class to represent a column name ColumnRenderersBuilder = None #: Class to build and parse the directive for Table.COLUMN_RENDERERS_ATTRIBUTE (io.deephaven.engine.util.ColumnRenderersBuilder). DistinctFormatter = None #: Class to create distinct and unique coloration for each unique input value (io.deephaven.engine.util.ColorUtil$DistinctFormatter). DownsampledWhereFilter = None #: Class to downsample time series data by calculating the bin intervals for values, and then using upperBin and lastBy to select the last row for each bin (io.deephaven.engine.table.impl.select.DownsampledWhereFilter). @@ -33,12 +34,13 @@ def _defineSymbols(): if not jpy.has_jvm(): raise SystemError("No java functionality can be used until the JVM has been initialized through the jpy module") - global Aggregation, ColumnRenderersBuilder, DistinctFormatter, DownsampledWhereFilter, DynamicTableWriter, \ + global Aggregation, ColumnName, ColumnRenderersBuilder, DistinctFormatter, DownsampledWhereFilter, DynamicTableWriter, \ LayoutHintBuilder, Replayer, SmartKey, SortColumn, TotalsTableBuilder if Aggregation is None: # This will raise an exception if the desired object is not the classpath Aggregation = jpy.get_type('io.deephaven.api.agg.Aggregation') + ColumnName = jpy.get_type("io.deephaven.api.ColumnName") ColumnRenderersBuilder = jpy.get_type('io.deephaven.engine.util.ColumnRenderersBuilder') DistinctFormatter = jpy.get_type('io.deephaven.engine.util.ColorUtil$DistinctFormatter') DownsampledWhereFilter = jpy.get_type('io.deephaven.engine.table.impl.select.DownsampledWhereFilter') diff --git a/Integrations/python/deephaven/__init__.py b/Integrations/python/deephaven/__init__.py index 15d691abe17..9f105709de5 100644 --- a/Integrations/python/deephaven/__init__.py +++ b/Integrations/python/deephaven/__init__.py @@ -32,7 +32,7 @@ * from conversion_utils import convertToJavaArray, convertToJavaList, convertToJavaArrayList, convertToJavaHashSet, convertToJavaHashMap -* from TableManipulation import Aggregation, ColumnRenderersBuilder, DistinctFormatter, +* from TableManipulation import Aggregation, ColumnName, ColumnRenderersBuilder, DistinctFormatter, DownsampledWhereFilter, DynamicTableWriter, LayoutHintBuilder, Replayer, SmartKey, SortColumn, TotalsTableBuilder, WindowCheck @@ -55,7 +55,7 @@ "convertToJavaArray", "convertToJavaList", "convertToJavaArrayList", "convertToJavaHashSet", "convertToJavaHashMap", # from conversion_utils - 'Aggregation', 'ColumnRenderersBuilder', 'DistinctFormatter', 'DownsampledWhereFilter', 'DynamicTableWriter', + '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 @@ -97,7 +97,7 @@ from .csv import read as read_csv from .csv import write as write_csv - +from .conversion_utils import convertToJavaList as as_list # NB: this must be defined BEFORE importing .jvm_init or .start_jvm (circular import) def initialize(): @@ -124,9 +124,9 @@ def initialize(): import deephaven.TableManipulation deephaven.TableManipulation._defineSymbols() - global Aggregation, ColumnRenderersBuilder, DistinctFormatter, DownsampledWhereFilter, DynamicTableWriter, \ + global Aggregation, ColumnName, ColumnRenderersBuilder, DistinctFormatter, DownsampledWhereFilter, DynamicTableWriter, \ LayoutHintBuilder, Replayer, SmartKey, SortColumn, TotalsTableBuilder - from deephaven.TableManipulation import Aggregation, ColumnRenderersBuilder, DistinctFormatter, \ + from deephaven.TableManipulation import Aggregation, ColumnName, ColumnRenderersBuilder, DistinctFormatter, \ DownsampledWhereFilter, DynamicTableWriter, LayoutHintBuilder, Replayer, SmartKey, \ SortColumn, TotalsTableBuilder @@ -415,6 +415,12 @@ def doLocked(f, lock_type="shared"): def combo_agg(agg_list): + """ + Combines aggregations. + + :param agg_list: list of aggregations + :return: combined aggregations + """ _JArrayList = jpy.get_type("java.util.ArrayList") j_agg_list = _JArrayList(len(agg_list)) for agg in agg_list: