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

feat!: Add multi-column support to AggFormula #363

Open
deephaven-internal opened this issue Nov 18, 2024 · 0 comments
Open

feat!: Add multi-column support to AggFormula #363

deephaven-internal opened this issue Nov 18, 2024 · 0 comments

Comments

@deephaven-internal
Copy link

This issue was auto-generated

PR: deephaven/deephaven-core#6206
Author: lbooker42

Original PR Body

Python examples:

from deephaven import empty_table
from deephaven import agg

source = empty_table(20).update(
    ["X = i", "Y = 2 * i", "Z = 3 * i", "Letter = (X % 2 == 0) ? `A` : `B`"]
)

result = source.agg_by([
    agg.formula(formula="out_a=sqrt(5.0)"),
    agg.formula(formula="out_b=min(X)"),
    agg.formula(formula="out_c=min(X) + max(Y)"),
    agg.formula(formula="out_d=sum(X + Y + Z)"),
], by=["Letter"])

Groovy examples:

source = emptyTable(20).update("X = i", "Y = 2 * i", "Z = 3 * i", "Letter = (X % 2 == 0) ? `A` : `B`")

result = source.aggBy([
    AggFormula("out_a=sqrt(5.0)"),
    AggFormula("out_b=min(X)"),
    AggFormula("out_c=min(X) + max(Y)"),
    AggFormula("out_d=sum(X + Y + Z)"),
], "Letter")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant