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

Add PartitionedTable transform() and partitioned_transform() methods #2557

Merged

Conversation

jmao-denver
Copy link
Contributor

Fixes #2549

jmao-denver and others added 5 commits June 23, 2022 09:24
Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
…thonObjectWrapper.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
…thonValueGetter.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
@jmao-denver jmao-denver requested a review from rcaudy June 23, 2022 20:03
py/server/deephaven/table.py Outdated Show resolved Hide resolved
py/server/deephaven/table.py Outdated Show resolved Hide resolved
jmao-denver and others added 8 commits June 23, 2022 14:51
…thonBiFunction.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
…thonBiFunction.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
…thonBiFunction.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
…thonFunction.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
…thonFunction.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
…thonFunction.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
…thonBiFunction.java

Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
jmao-denver and others added 2 commits June 23, 2022 15:02
@jmao-denver jmao-denver merged commit 2d04563 into deephaven:main Jun 23, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Jun 23, 2022
return PythonValueGetter.getValue(out, classOut);
}

public static class PythonUnaryOperator<T> extends PythonFunction<T, T> implements UnaryOperator<T> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like it should be a separate file / class and not a subclass.

if (valueIn == null) {
return QueryConstants.NULL_FLOAT;
}
return (float) valueIn.getDoubleValue(); // NB: should there be a getFloatValue() in jpy?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to error on casting out of range? Handle nulls in cast?

if (valueIn == null) {
return QueryConstants.NULL_SHORT;
}
return (short) valueIn.getIntValue(); // NB: should there be a getShortValue() in jpy?
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to error on casting out of range? Handle nulls in cast?

if (valueIn == null) {
return QueryConstants.NULL_BYTE; // NB: should there be a getByteValue() in jpy?
}
return (byte) valueIn.getIntValue();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to error on casting out of range? Handle nulls in cast?

Comment on lines +1477 to +1481
"""Join the underlying partitioned Tables from this PartitionedTable and other on the key columns, then apply
the provided function to all pairs of constituent Tables with the same keys in order to produce a new
PartitionedTable with the results as its constituents, with the same data for all other columns in the
underlying partitioned Table from this. Note that if the Tables underlying this PartitionedTable or other
change, a corresponding change will propagate to the result.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    """Join this and the other PartitionedTables on the key columns and applies the provided function to all pairs
    of constituent tables with the same keys.  The resulting tables are used to produce a new PartitionedTable 
    with the results as its constituents and with the same data as this PartitionedTable for all other columns.

    Note that if the Tables underlying this PartitionedTable or other change, a corresponding change will 
    propagate to the result.

@jmao-denver jmao-denver deleted the 2549-partitioned-table-transform branch February 8, 2023 18:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add PartitionedTable transform methods to the Python wrapper
3 participants