repr: switch Diff type from isize -> i64#10777
Conversation
|
@danhhz could you take a look at the changes in |
There was a problem hiding this comment.
I'm happy to switch isize to i64 in persist, but please don't introduce a dep on repr. src/persist is meant to be a strong abstraction boundary of something that could be independently useful by other differential dataflow users. The featureset is obviously entirely driven by mz's needs and I have no plans to actually extract it, but strong abstractions are critical in building maintainable complex systems, and a dep on repr fails the litmus test.
It's absolutely appropriate to use mz_repr::Diff in STORAGE and then have persist be i64. If we want that type to be able to vary, we also could abstract out ts and diff with something like Codec (though ideally more restrictive than Codec because there are some nice perf things we get in columnar storage from knowing it's an 8-byte integral type).
Happy to hop on a call to hash this out if there's some other requirements I'm not seeing here.
But is that really the case? The fact that this PR had to go in persist and change the type means that the abstraction boundary doesn't actually exist. If tomorrow we make From my point of view adding the
That would be amazing, I asked about this in #persist too. IMO only when this is done we can claim that |
|
Yeah, I saw your question in #persist after I wrote this comment, but Slack is only working on mobile for me ATM, so I haven't responded to it yet. I think it's important to distinguish between "the abstraction boundary doesn't actually exist" (your words) and "the featureset is obviously entirely driven by mz's needs" (mine). All we've needed so far is u64 for ts and isize for diff and so that's what we have. We have a ton of work left to do in productionizing persist and so I'm cutting corners where they can be cut. Doing the refactor to make ts and diff swappable has so far been one of those. In the short term, the way to land this PR is to use i64 in src/persist. It sounds like you'd like these to be abstract in persist and I'm happy to do the work. I have two followup questions:
|
Even though we currently only run materialized in 64bit machines it's good to have a platform indepenent type, especially since we persist it. Signed-off-by: Petros Angelatos <petrosagg@gmail.com>
|
If we viewed
It's only a wish (not even a need) if making
I just did this change, there is now no mention of |
|
Thank you! Happy to continue to discuss making Time and Diff pluggable if you like! |
Motivation
Even though we currently only run materialized in 64bit machines it's
good to have a platform independent type, especially since we persist it.
Checklist