-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[HOTFIX]: bug in DynamicIntArray.toArray() and redundant memory copy …
…for HeapByteBuffer in StringColumnReader. (#57)
- Loading branch information
Showing
4 changed files
with
43 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
pixels-core/src/test/java/io/pixelsdb/pixels/core/utils/TestDynamicIntArray.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package io.pixelsdb.pixels.core.utils; | ||
|
||
import org.junit.Test; | ||
|
||
/** | ||
* Created at: 20-1-8 | ||
* Author: hank | ||
*/ | ||
public class TestDynamicIntArray | ||
{ | ||
@Test | ||
public void test () | ||
{ | ||
DynamicIntArray array = new DynamicIntArray(64); | ||
for (int i = 0; i < 1024; ++i) | ||
{ | ||
array.add(i); | ||
} | ||
int[] ints = array.toArray(); | ||
for (int i = 0; i < array.size(); ++i) | ||
{ | ||
assert i == ints[i]; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters