Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Per email from Brad Maggard on 2015-09-16, addfieldusingcontext() doe… #343
Per email from Brad Maggard on 2015-09-16, addfieldusingcontext() doesn't have access to the new field, making calculations like running sum more complicated.
The generator yields the tuple from the original table. It now creates a new Record() object with the additional field and the previous row's value, providing access to the prior row's new field.
I profiled both time and memory usage - the extra step of creating the Record() instance is minimal.
On a random table of 1MM rows, it added 100KB of memory at runtime and changed execution time from 63 seconds to 65 seconds on my test.
Thanks a lot Roger, I'll review asap.
On Wednesday, September 16, 2015, Roger Woodley email@example.com