You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by "kfaraz (via GitHub)" <gi...@apache.org> on 2024/05/13 03:19:54 UTC

Re: [PR] Replace if-return with Assume API from Junit in `DecimalParquetInputTest` (druid)

kfaraz commented on code in PR #16436:
URL: https://github.com/apache/druid/pull/16436#discussion_r1597826750


##########
extensions-core/parquet-extensions/src/test/java/org/apache/druid/data/input/parquet/DecimalParquetInputTest.java:
##########
@@ -148,13 +148,12 @@ public void testReadParquetDecimali32() throws IOException, InterruptedException
   public void testReadParquetDecimali64() throws IOException, InterruptedException
   {
     // parquet-avro does not correctly convert decimal types
-    if (parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE)) {
-      return;
-    }
+    assumeFalse(parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE));
+
     HadoopDruidIndexerConfig config = transformHadoopDruidIndexerConfig(
-        "example/decimals/dec_in_i64.json",
-        parserType,
-        true
+            "example/decimals/dec_in_i64.json",

Review Comment:
   These changes are not needed as this code is already formatted correctly according to the formatting style used by this project. Same comment for the other formatting changes.



##########
extensions-core/parquet-extensions/src/test/java/org/apache/druid/data/input/parquet/DecimalParquetInputTest.java:
##########
@@ -101,13 +102,12 @@ public void testReadParquetDecimalFixedLen() throws IOException, InterruptedExce
   public void testReadParquetDecimali32() throws IOException, InterruptedException
   {
     // parquet-avro does not correctly convert decimal types
-    if (parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE)) {
-      return;
-    }
+    assumeFalse(parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE));

Review Comment:
   Druid code doesn't use the import static style.
   
   ```suggestion
       Assume.assumeFalse(parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE));
   ```



-- 
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: commits-unsubscribe@druid.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org