Parameterize the segment size

This will be helpful for tests. I think at some point we should consider
just assignment Schema as a field of Table.
Add a basic test for the interval and segment allocation logic