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

Create a helper function to wrap a list of Aggregations and hide JPY from users #1632

Closed
jmao-denver opened this issue Dec 3, 2021 · 1 comment
Assignees
Labels
bug Something isn't working python python-server-side
Milestone

Comments

@jmao-denver
Copy link
Contributor

in deephaven/init_.py, add

JArrayList = jpy.get_type("java.util.ArrayList")
def combo_agg(aggs:List[Aggregation]):
   j_agg_list = JArrayList()
   for agg in aggs:
       j_agg_list.add(agg)
   return j_agg_list

to use:

aggs = combo_agg([Aggregation.Avg(...), Aggregation.Sum(...)])
t.aggBy(aggs, by)
@jmao-denver jmao-denver added bug Something isn't working python python-server-side labels Dec 3, 2021
@jmao-denver jmao-denver added this to the Dec 2021 milestone Dec 3, 2021
@jmao-denver jmao-denver self-assigned this Dec 3, 2021
@jmao-denver
Copy link
Contributor Author

a working example:

from deephaven.TableTools import newTable, stringCol, intCol, doubleCol
from deephaven import Aggregation, combo_agg
Arrays = jpy.get_type("java.util.Arrays")

source = newTable(
    stringCol("X", "A", "B", "A", "C", "B", "A", "B", "B", None),
    stringCol("Y", "M", "N", None, "N", "P", "M", None, "P", "M"),
    intCol("Number", 55, 76, 20, 130, 230, 50, 73, 137, 214),
)

aggs =  combo_agg([Aggregation.AggAvg("Number")])

result = source.aggBy(aggs, "X")

jmao-denver added a commit to jmao-denver/deephaven-core that referenced this issue Dec 3, 2021
mofojed pushed a commit that referenced this issue Nov 10, 2023
Release notes https://github.com/deephaven/web-client-ui/releases/tag/v0.54.0

# [0.54.0](deephaven/web-client-ui@v0.53.0...v0.54.0) (2023-11-10)


### Bug Fixes

* Date argument non-optional for the onChange prop ([#1622](deephaven/web-client-ui#1622)) ([9a960b3](deephaven/web-client-ui@9a960b3)), closes [#1601](deephaven/web-client-ui#1601)
* Fixing grid colors and grays ([#1621](deephaven/web-client-ui#1621)) ([9ab2b1e](deephaven/web-client-ui@9ab2b1e)), closes [#1572](deephaven/web-client-ui#1572)
* Infinite loop with grid rendering ([#1631](deephaven/web-client-ui#1631)) ([4875d2e](deephaven/web-client-ui@4875d2e)), closes [#1626](deephaven/web-client-ui#1626)
* Log figure errors, don't show infinite spinner ([#1614](deephaven/web-client-ui#1614)) ([75783d0](deephaven/web-client-ui@75783d0))
* non-contiguous table row selection background colour ([#1623](deephaven/web-client-ui#1623)) ([61d1a53](deephaven/web-client-ui@61d1a53)), closes [#1619](deephaven/web-client-ui#1619)
* Panels not reinitializing if makeModel changes ([#1633](deephaven/web-client-ui#1633)) ([5ee98cd](deephaven/web-client-ui@5ee98cd))
* remove unecessary dom re-calc in grid render ([#1632](deephaven/web-client-ui#1632)) ([ce7cc3e](deephaven/web-client-ui@ce7cc3e))


### Features

* Add `LayoutManagerContext` and `useLayoutManager` ([#1625](deephaven/web-client-ui#1625)) ([0a6965a](deephaven/web-client-ui@0a6965a))
* Add ResizeObserver to Grid and Chart ([#1626](deephaven/web-client-ui#1626)) ([35311c8](deephaven/web-client-ui@35311c8))
* Added test:debug script ([#1628](deephaven/web-client-ui#1628)) ([80f29f5](deephaven/web-client-ui@80f29f5)), closes [#1627](deephaven/web-client-ui#1627)
* Read settings from props/server config when available ([#1558](deephaven/web-client-ui#1558)) ([52ba2cd](deephaven/web-client-ui@52ba2cd))
* Theming - Charts ([#1608](deephaven/web-client-ui#1608)) ([d5b3b48](deephaven/web-client-ui@d5b3b48)), closes [#1572](deephaven/web-client-ui#1572)


### BREAKING CHANGES

- ChartThemeProvider is now required to provide ChartTheme
- ChartModelFactory and ChartUtils now require chartTheme args

Co-authored-by: deephaven-internal <deephaven-internal@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working python python-server-side
Projects
None yet
Development

No branches or pull requests

1 participant