-
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
feat: add multi-column support to UpdateBy
RollingFormula()
operator
#6143
feat: add multi-column support to UpdateBy
RollingFormula()
operator
#6143
Conversation
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.
Code review Part 1: All replicated files and files with smaller changes
Base/src/main/java/io/deephaven/base/ringbuffer/RingBuffer.java
Outdated
Show resolved
Hide resolved
Base/src/main/java/io/deephaven/base/ringbuffer/RingBuffer.java
Outdated
Show resolved
Hide resolved
...gine/table/impl/updateby/rollingformula/ringbuffervectorwrapper/RingBufferVectorWrapper.java
Outdated
Show resolved
Hide resolved
...gine/table/impl/updateby/rollingformula/ringbuffervectorwrapper/RingBufferVectorWrapper.java
Outdated
Show resolved
Hide resolved
// noinspection unchecked | ||
result = new ObjectRingBufferVectorWrapper<T>((ObjectRingBuffer<T>) buffer, (Class<T>) componentType); |
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.
Please check to get full test coverage.
...a/io/deephaven/engine/table/impl/updateby/rollingminmax/ComparableRollingMinMaxOperator.java
Outdated
Show resolved
Hide resolved
...e/table/impl/updateby/rollingformulamulticolumn/windowconsumer/RingBufferWindowConsumer.java
Outdated
Show resolved
Hide resolved
...e/table/impl/updateby/rollingformulamulticolumn/windowconsumer/RingBufferWindowConsumer.java
Outdated
Show resolved
Hide resolved
...ble/impl/updateby/rollingformulamulticolumn/windowconsumer/CharRingBufferWindowConsumer.java
Outdated
Show resolved
Hide resolved
...e/impl/updateby/rollingformulamulticolumn/windowconsumer/ObjectRingBufferWindowConsumer.java
Outdated
Show resolved
Hide resolved
table-api/src/main/java/io/deephaven/api/updateby/UpdateByOperation.java
Outdated
Show resolved
Hide resolved
table-api/src/main/java/io/deephaven/api/updateby/UpdateByOperation.java
Outdated
Show resolved
Hide resolved
engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestRollingFormula.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/updateby/UpdateByOperatorFactory.java
Outdated
Show resolved
Hide resolved
table-api/src/main/java/io/deephaven/api/updateby/spec/RollingFormulaSpec.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
UpdateBy
RollingFormula()
operatorUpdateBy
RollingFormula()
operator
Base/src/main/java/io/deephaven/base/ringbuffer/RingBuffer.java
Outdated
Show resolved
Hide resolved
...va/io/deephaven/engine/table/impl/updateby/rollingformula/BooleanRollingFormulaOperator.java
Show resolved
Hide resolved
table-api/src/main/java/io/deephaven/api/updateby/spec/RollingFormulaSpec.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
|
engine/table/src/main/java/io/deephaven/engine/table/impl/updateby/UpdateByOperator.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/updateby/UpdateByOperator.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/updateby/UpdateByOperatorFactory.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/updateby/UpdateByOperatorFactory.java
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/updateby/UpdateByOperatorFactory.java
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/updateby/UpdateByOperatorFactory.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/updateby/UpdateByOperatorFactory.java
Outdated
Show resolved
Hide resolved
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.
Looking pretty good. We can take a more thorough/complete pass next week if needed, but I don't want to duplicate effort too much. Do want to look at things after refactoring to rely more on SelectColumn
and Selectable
.
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
ef9aab7
to
36756da
Compare
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.
Just need to look at the operator code (base and multi). Deferring Python.
Base/src/main/java/io/deephaven/base/ringbuffer/ObjectRingBuffer.java
Outdated
Show resolved
Hide resolved
...e/table/impl/updateby/rollingformulamulticolumn/windowconsumer/RingBufferWindowConsumer.java
Outdated
Show resolved
Hide resolved
...e/table/impl/updateby/rollingformulamulticolumn/windowconsumer/RingBufferWindowConsumer.java
Outdated
Show resolved
Hide resolved
...e/table/impl/updateby/rollingformulamulticolumn/windowconsumer/RingBufferWindowConsumer.java
Outdated
Show resolved
Hide resolved
table-api/src/main/java/io/deephaven/api/updateby/UpdateByOperation.java
Outdated
Show resolved
Hide resolved
table-api/src/main/java/io/deephaven/api/updateby/spec/RollingFormulaSpec.java
Show resolved
Hide resolved
engine/table/src/test/java/io/deephaven/engine/table/impl/updateby/TestRollingFormula.java
Show resolved
Hide resolved
vectorColumnNameMap = new HashMap<>(); | ||
columnDefinitionMap.forEach((key, value) -> { | ||
final ColumnDefinition<?> columnDef = ColumnDefinition.fromGenericType( | ||
key, VectorFactory.forElementType(value.getDataType()).vectorType()); |
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.
Add component type (that is, value.getDataType()
). I wonder if that means we need more testing for Object inputs.
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 is done, thinking about add'l testing
engine/table/src/main/java/io/deephaven/engine/table/impl/updateby/UpdateByOperatorFactory.java
Show resolved
Hide resolved
Base/src/main/java/io/deephaven/base/ringbuffer/ObjectRingBuffer.java
Outdated
Show resolved
Hide resolved
table-api/src/main/java/io/deephaven/api/updateby/spec/RollingFormulaSpec.java
Outdated
Show resolved
Hide resolved
table-api/src/main/java/io/deephaven/api/updateby/spec/RollingFormulaSpec.java
Outdated
Show resolved
Hide resolved
table-api/src/main/java/io/deephaven/api/updateby/spec/RollingFormulaSpec.java
Show resolved
Hide resolved
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.
Pretty close to mergeable. I kind of wonder if we should be deleting the single-input implementation and always using the new one.
table-api/src/main/java/io/deephaven/api/updateby/spec/RollingFormulaSpec.java
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
|
||
@Override | ||
public void applyOutputShift(@NotNull final RowSet subRowSetToShift, final long delta) { | ||
((SparseArrayColumnSource<?>) outputSource).shift(subRowSetToShift, delta); |
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 may break if you have a reinterpret. Be sure to test shifts + reinterpret.
I think you're already OK... but a test might help prove it.
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
.../engine/table/impl/updateby/rollingformulamulticolumn/RollingFormulaMultiColumnOperator.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/select/SelectColumn.java
Outdated
Show resolved
Hide resolved
engine/table/src/main/java/io/deephaven/engine/table/impl/sources/ObjectSingleValueSource.java
Outdated
Show resolved
Hide resolved
Labels indicate documentation is required. Issues for documentation have been opened: Community: deephaven/deephaven-docs-community#352 |
No description provided.