Skip to content

Commit

Permalink
Used vec and vecObj for vector data generation. Scaled tests again
Browse files Browse the repository at this point in the history
  • Loading branch information
stanbrub committed Oct 13, 2023
1 parent 903aa41 commit 1eb8fb9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,67 +10,67 @@ class ParquetSingleColTest {

@Test
void writeOneStringCol() {
runner.setScaleFactors(5, 15);
runner.setScaleFactors(5, 10);
runner.runWriteTest("ParquetWrite- 1 String Col -Static", "SNAPPY", "str10K");
}

@Test
void writeOneBigDecimalCol() {
runner.setScaleFactors(5, 6);
runner.setScaleFactors(5, 3);
runner.runWriteTest("ParquetWrite- 1 Big Decimal Col -Static", "SNAPPY", "bigDec10K");
}

@Test
void writeOneLongCol() {
runner.setScaleFactors(5, 15);
runner.setScaleFactors(5, 10);
runner.runWriteTest("ParquetWrite- 1 Long Col -Static", "SNAPPY", "long10K");
}

@Test
void writeOneIntCol() {
runner.setScaleFactors(5, 30);
runner.setScaleFactors(5, 20);
runner.runWriteTest("ParquetWrite- 1 Int Col -Static", "SNAPPY", "int10K");
}

@Test
void writeOneShortCol() {
runner.setScaleFactors(5, 35);
runner.setScaleFactors(5, 20);
runner.runWriteTest("ParquetWrite- 1 Short Col -Static", "SNAPPY", "short10K");
}

@Test
void writeOneInt1KArrayCol() {
runner.setScaleFactors(0.10, 1);
runner.setScaleFactors(0.10, 2);
runner.runWriteTest("ParquetWrite- 1 Array Col of 1K Ints -Static", "SNAPPY", "intArr1K");
}

@Test
void writeOneInt1KVectorCol() {
runner.setScaleFactors(0.10, 1);
runner.setScaleFactors(0.10, 2);
runner.runWriteTest("ParquetWrite- 1 Vector Col of 1K Ints -Static", "SNAPPY", "intVec1K");
}

@Test
void writeOneInt5ArrayCol() {
runner.setScaleFactors(2, 4);
runner.setScaleFactors(2, 10);
runner.runWriteTest("ParquetWrite- 1 Array Col of 5 Ints -Static", "SNAPPY", "intArr5");
}

@Test
void writeOneInt5VectorCol() {
runner.setScaleFactors(2, 4);
runner.setScaleFactors(2, 10);
runner.runWriteTest("ParquetWrite- 1 Vector Col of 5 Ints -Static", "SNAPPY", "intVec5");
}

@Test
void writeOneObjectArrayCol() {
runner.setScaleFactors(2, 2);
runner.setScaleFactors(2, 1);
runner.runWriteTest("ParquetWrite- 1 Array Col of 3 Strings and 2 Nulls -Static", "SNAPPY", "objArr5");
}

@Test
void writeOneObjectVectorCol() {
runner.setScaleFactors(2, 1);
runner.setScaleFactors(1, 1);
runner.runWriteTest("ParquetWrite- 1 Vector Col of 3 String and 2 Nulls -Static", "SNAPPY", "objVec5");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ void setScaleFactors(double rowCountFactor, int scaleFactor) {
this.scaleRowCount = (long) (api.propertyAsIntegral("scale.row.count", "100000") * rowCountFactor);
this.scaleFactor = scaleFactor;
}

/**
* Use the default settings in deephaven-core for parquet dictionary and page size instead of the
* defaults used for benchmarks
* Use the default settings in deephaven-core for parquet dictionary and page size instead of the defaults used for
* benchmarks
*/
void useParquetDefaultSettings() {
this.useParquetDefaultSettings = true;
Expand Down Expand Up @@ -161,11 +161,11 @@ String getGenerator(final String columnName) {
case "short10K" -> "((short)(ii % 10000))";
case "bigDec10K" -> "java.math.BigDecimal.valueOf(ii % 10000)";
case "intArr5" -> array5;
case "intVec5" -> "new io.deephaven.vector.IntVectorDirect(" + array5 + ")";
case "intVec5" -> "vec(" + array5 + ")";
case "intArr1K" -> array1K;
case "intVec1K" -> "new io.deephaven.vector.IntVectorDirect(" + array1K + ")";
case "intVec1K" -> "vec(" + array1K + ")";
case "objArr5" -> objArr5;
case "objVec5" -> "new io.deephaven.vector.ObjectVectorDirect(" + objArr5 + ")";
case "objVec5" -> "vecObj(" + objArr5 + ")";
default -> throw new RuntimeException("Undefined column: " + columnName);
};
return "(ii % 10 == 0) ? null : " + gen;
Expand Down

0 comments on commit 1eb8fb9

Please sign in to comment.