Skip to content

Commit

Permalink
Fix csv read benchmark data types (#309)
Browse files Browse the repository at this point in the history
  • Loading branch information
stanbrub authored Jun 11, 2024
1 parent 5ffd1f7 commit df70671
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,16 @@ class CsvColTypeTest {

@Test
@Order(1)
void writeThreeIntegralCols() {
runner.setScaleFactors(5, 3);
runner.runCsvWriteTest("CsvWrite- 3 Integral Cols -Static", "short10K", "int10K", "long10K");
void writeFourIntegralCols() {
runner.setScaleFactors(5, 2);
runner.runCsvWriteTest("CsvWrite- 4 Integral Cols -Static", "byte100", "short10K", "int10K", "long10K");
}

@Test
@Order(2)
void readThreeIntegralCols() {
runner.setScaleFactors(5, 3);
runner.runCsvReadTest("CsvRead- 3 Integral Cols -Static", "short10K", "int10K", "long10K");
void readFourIntegralCols() {
runner.setScaleFactors(5, 2);
runner.runCsvReadTest("CsvRead- 4 Integral Cols -Static", "byte100", "short10K", "int10K", "long10K");
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ private String getGenerator(final String columnName) {
case "long10K" -> "(ii % 10000)";
case "int10K" -> "((int)(ii % 10000))";
case "short10K" -> "((short)(ii % 10000))";
case "byte100" -> "((byte)(ii % 100))";
case "bigDec10K" -> "java.math.BigDecimal.valueOf(ii % 10000)";
case "intArr5" -> array5;
case "intVec5" -> "vec(" + array5 + ")";
Expand All @@ -214,8 +215,9 @@ private String getType(String columnName) {
return switch (columnName) {
case "str10K" -> "dht.string";
case "long10K" -> "dht.long";
case "int10K" -> "dht.int_";
case "int10K" -> "dht.int32";
case "short10K" -> "dht.short";
case "byte100" -> "dht.byte";
case "bigDec10K" -> "dht.BigDecimal";
case "intArr5" -> "dht.int_array";
case "intVec5" -> "dht.int_array";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,17 @@ class ParquetColTypeTest {

@Test
@Order(1)
void writeThreeIntegralCols() {
runner.setScaleFactors(5, 15);
runner.runParquetWriteTest("ParquetWrite- 3 Integral Cols -Static", "NONE", "short10K", "int10K", "long10K");
void writeFourIntegralCols() {
runner.setScaleFactors(5, 12);
runner.runParquetWriteTest("ParquetWrite- 4 Integral Cols -Static", "NONE", "byte100", "short10K", "int10K",
"long10K");
}

@Test
@Order(2)
void readThreeIntegralCols() {
runner.setScaleFactors(5, 15);
runner.runParquetReadTest("ParquetRead- 3 Integral Cols -Static");
void readFourIntegralCols() {
runner.setScaleFactors(5, 12);
runner.runParquetReadTest("ParquetRead- 4 Integral Cols -Static");
}

@Test
Expand Down

0 comments on commit df70671

Please sign in to comment.