attilakreiner commented on code in PR #10657:
URL: https://github.com/apache/iceberg/pull/10657#discussion_r1668933800


##########
data/src/test/java/org/apache/iceberg/data/TestMetricsRowGroupFilterTypes.java:
##########
@@ -214,81 +218,101 @@ public void createParquetInputFile(List<Record> records) 
throws IOException {
 
     InputFile inFile = Files.localInput(PARQUET_FILE);
     try (ParquetFileReader reader = 
ParquetFileReader.open(parquetInputFile(inFile))) {
-      Assert.assertEquals("Should create only one row group", 1, 
reader.getRowGroups().size());
+      assertThat(reader.getRowGroups()).as("Should create only one row 
group").hasSize(1);
       rowGroupMetadata = reader.getRowGroups().get(0);
       parquetSchema = reader.getFileMetaData().getSchema();
     }
 
     PARQUET_FILE.deleteOnExit();
   }
 
-  private final FileFormat format;
-  private final String column;
-  private final Object readValue;
-  private final Object skipValue;
+  @Parameter(index = 0)
+  private FileFormat format;
 
-  @Parameterized.Parameters(name = "format = {0} column = {1} readValue = {2} 
skipValue = {3}")
-  public static Object[][] parameters() {
-    return new Object[][] {
-      {"parquet", "boolean", false, true},
-      {"parquet", "int", 5, 55},
-      {"parquet", "long", 5_000_000_049L, 5_000L},
-      {"parquet", "float", 1.97f, 2.11f},
-      {"parquet", "double", 2.11d, 1.97d},
-      {"parquet", "date", "2018-06-29", "2018-05-03"},
-      {"parquet", "time", "10:02:34.000000", "10:02:34.000001"},
-      {"parquet", "timestamp", "2018-06-29T10:02:34.000000", 
"2018-06-29T15:02:34.000000"},
-      {
-        "parquet",
-        "timestamptz",
-        "2018-06-29T10:02:34.000000+00:00",
-        "2018-06-29T10:02:34.000000-07:00"
-      },
-      {"parquet", "string", "tapir", "monthly"},
-      // { "parquet", "uuid", uuid, UUID.randomUUID() }, // not supported yet
-      {"parquet", "fixed", "abcd".getBytes(StandardCharsets.UTF_8), new byte[] 
{0, 1, 2, 3}},
-      {"parquet", "binary", "xyz".getBytes(StandardCharsets.UTF_8), new byte[] 
{0, 1, 2, 3, 4, 5}},
-      {"parquet", "int_decimal", "77.77", "12.34"},
-      {"parquet", "long_decimal", "88.88", "12.34"},
-      {"parquet", "fixed_decimal", "99.99", "12.34"},
-      {"orc", "boolean", false, true},
-      {"orc", "int", 5, 55},
-      {"orc", "long", 5_000_000_049L, 5_000L},
-      {"orc", "float", 1.97f, 2.11f},
-      {"orc", "double", 2.11d, 1.97d},
-      {"orc", "date", "2018-06-29", "2018-05-03"},
-      {"orc", "time", "10:02:34.000000", "10:02:34.000001"},
-      {"orc", "timestamp", "2018-06-29T10:02:34.000000", 
"2018-06-29T15:02:34.000000"},
-      {
-        "orc", "timestamptz", "2018-06-29T10:02:34.000000+00:00", 
"2018-06-29T10:02:34.000000-07:00"
-      },
-      {"orc", "string", "tapir", "monthly"},
-      // uuid, fixed and binary types not supported yet
-      // { "orc", "uuid", uuid, UUID.randomUUID() },
-      // { "orc", "fixed", "abcd".getBytes(StandardCharsets.UTF_8), new byte[] 
{ 0, 1, 2, 3 } },
-      // { "orc", "binary", "xyz".getBytes(StandardCharsets.UTF_8), new byte[] 
{ 0, 1, 2, 3, 4, 5 }
-      // },
-      {"orc", "int_decimal", "77.77", "12.34"},
-      {"orc", "long_decimal", "88.88", "12.34"},
-      {"orc", "fixed_decimal", "99.99", "12.34"},
-    };
-  }
+  @Parameter(index = 1)
+  private String column;
+
+  @Parameter(index = 2)
+  private Object readValue;
+
+  @Parameter(index = 3)
+  private Object skipValue;
 
-  public TestMetricsRowGroupFilterTypes(
-      String format, String column, Object readValue, Object skipValue) {
-    this.format = FileFormat.fromString(format);
-    this.column = column;
-    this.readValue = readValue;
-    this.skipValue = skipValue;
+  @Parameters(name = "format = {0}, column = {1}, readValue = {2}, skipValue = 
{3}")
+  public static Collection<Object[]> parameters() {

Review Comment:
   Reverted to the old `Object[][]` signature which seems to be the existing 
convention for the code that has already been converted to Junit 5.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to