-
Notifications
You must be signed in to change notification settings - Fork 40
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 cell.above to refer to previous row value #295
Conversation
# Conflicts: # webtau-core/src/main/java/com/twosigma/webtau/Ddjt.java # webtau-core/src/test/groovy/com/twosigma/webtau/data/table/TableDataTest.groovy
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.
Should also rename the PR as it's not cell.value
.
["Col A" | "Col B" | "Col C"] { | ||
__________________________________________ | ||
"v1a" | "v1b" | 10 | ||
"v2a" | "v2b" | cell.previous |
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.
How about cell.above
? Or row.previous
? I'm slightly concerned that cell.previous
makes it ambiguous whether it means previous row or column.
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.
I like row.previous
. Wanted to have all the generator functions under one namespace. There is cell.value(lambda)
and cell.previous
, maybe more to come. but maybe it is ok.
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.
cell.above
is growing on me.
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.
renamed
|
||
public RecordFromStream(Stream<Object> valuesStream) { | ||
values = new ArrayList<>(); | ||
Iterator<Object> it = valuesStream.iterator(); |
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.
Why not use valueStream.forEach
instead of using the iterator manually?
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.
Will it require some manipulation with index wrapping that needs to be defined outside?
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.
OH nevermind, there is no more idx manipulation.
|
||
import com.twosigma.webtau.data.table.Record; | ||
|
||
public interface TableDataCellValueGenOnlyRecordFunction<R> { |
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.
That is quite an interface name...
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.
Agree, happy to rename :( It is two parts name, last being OnlyRecordFunction
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.
Yeah, I have no suggestions :) was just commenting on how long it was.
TBD: what's the definition of "cell.above" if the written value is a permute() function? |
#297 to continue with validation of |
Initial functionality to allow the following.
It is not feature complete yet but want us to settle on names and approach.
Most likely
__
shortcut will be added to mean the same ascell.above