-
Notifications
You must be signed in to change notification settings - Fork 80
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
Add PartitionedTable transform() and partitioned_transform() methods #2557
Conversation
Integrations/src/main/java/io/deephaven/integrations/python/PythonFunction.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonBiFunction.java
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonFunction.java
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonObjectWrapper.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonObjectWrapper.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonValueGetter.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonValueGetter.java
Outdated
Show resolved
Hide resolved
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>
Integrations/src/main/java/io/deephaven/integrations/python/PythonBiFunction.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonBiFunction.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonBiFunction.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonFunction.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonFunction.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonFunction.java
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonBiFunction.java
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonBiFunction.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonBiFunction.java
Outdated
Show resolved
Hide resolved
Integrations/src/main/java/io/deephaven/integrations/python/PythonFunction.java
Outdated
Show resolved
Hide resolved
…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>
Integrations/src/main/java/io/deephaven/integrations/python/PythonObjectWrapper.java
Show resolved
Hide resolved
…thonObjectWrapper.java Co-authored-by: Ryan Caudy <rcaudy@gmail.com>
return PythonValueGetter.getValue(out, classOut); | ||
} | ||
|
||
public static class PythonUnaryOperator<T> extends PythonFunction<T, T> implements UnaryOperator<T> { |
There was a problem hiding this comment.
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? |
There was a problem hiding this comment.
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? |
There was a problem hiding this comment.
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(); |
There was a problem hiding this comment.
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?
"""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. |
There was a problem hiding this comment.
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.
Fixes #2549