Describe the current behavior
split() works for some chunk size but fails for others when chunks are not successive.
Example
chunk1: offset = 0, values = [1, 2, 3]
chunk2: offset = 6, values = [7, 8]
# timeSeries
timeSeries (chunk1, chunk2): [1d, 2d, 3d, NaN, NaN, NaN, 7d, 8d]
split(2) works and returns non successive chunks:
offset = 0, values = [1, 2]
offset = 2, values = [3]
offset = 6, values = [7, 8]
These chunks are not successive: after offset 2 with size 1, the next expected offset should be 3, not 6.
-
split(3) works also.
-
but split(4) fails with:
java.lang.IllegalArgumentException: Chunks are not successive. First offset is 0 and first size is 3; second offset should be 3but is 6
Describe the expected behavior
The behavior should be consistent.
Either:
- non successive chunks are supported, and split() should work for all valid split sizes, or
- non successive chunks are not supported, and split() should fail consistently.
Describe the steps
- Create a time series with two non successive chunks:
Example
DoubleDataChunk chunk1 = new UncompressedDoubleDataChunk(0, new double[]{1d, 2d, 3d});
DoubleDataChunk chunk2 = new UncompressedDoubleDataChunk(6, new double[]{7d, 8d});
StoredDoubleTimeSeries timeSeries = new StoredDoubleTimeSeries(metadata, chunk1, chunk2);
- Call split(2)
this works
- Call split(3)
this works also
- Call split(4)
this fails
Environment
Version: 7.2.1
Relevant Log Output
No response
Extra Information
No response
Describe the current behavior
split()works for some chunk size but fails for others when chunks are not successive.Example
split(2)works and returns non successive chunks:These chunks are not successive: after offset 2 with size 1, the next expected offset should be 3, not 6.
split(3)works also.but
split(4)fails with:java.lang.IllegalArgumentException: Chunks are not successive. First offset is 0 and first size is 3; second offset should be 3but is 6Describe the expected behavior
The behavior should be consistent.
Either:
Describe the steps
Example
this works
this works also
this fails
Environment
Version: 7.2.1
Relevant Log Output
No response
Extra Information
No response