You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by kf...@apache.org on 2024/05/14 15:43:13 UTC

(druid) branch master updated: Refactor: Clean up `DecimalParquetInputTest` using Assume (#16436)

This is an automated email from the ASF dual-hosted git repository.

kfaraz pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/druid.git


The following commit(s) were added to refs/heads/master by this push:
     new 621525a5cb3 Refactor: Clean up `DecimalParquetInputTest` using Assume (#16436)
621525a5cb3 is described below

commit 621525a5cb32311d1740ae9793c04c129fca6482
Author: Codegass <wc...@gmail.com>
AuthorDate: Tue May 14 11:43:07 2024 -0400

    Refactor: Clean up `DecimalParquetInputTest` using Assume (#16436)
---
 .../data/input/parquet/DecimalParquetInputTest.java      | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/extensions-core/parquet-extensions/src/test/java/org/apache/druid/data/input/parquet/DecimalParquetInputTest.java b/extensions-core/parquet-extensions/src/test/java/org/apache/druid/data/input/parquet/DecimalParquetInputTest.java
index 37c99f53baf..f4e8a856d87 100644
--- a/extensions-core/parquet-extensions/src/test/java/org/apache/druid/data/input/parquet/DecimalParquetInputTest.java
+++ b/extensions-core/parquet-extensions/src/test/java/org/apache/druid/data/input/parquet/DecimalParquetInputTest.java
@@ -23,6 +23,7 @@ import com.google.common.collect.ImmutableList;
 import org.apache.druid.data.input.InputRow;
 import org.apache.druid.indexer.HadoopDruidIndexerConfig;
 import org.junit.Assert;
+import org.junit.Assume;
 import org.junit.Test;
 import org.junit.runner.RunWith;
 import org.junit.runners.Parameterized;
@@ -54,9 +55,8 @@ public class DecimalParquetInputTest extends BaseParquetInputTest
   public void testReadParquetDecimalFixedLen() throws IOException, InterruptedException
   {
     // parquet-avro does not correctly convert decimal types
-    if (parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE)) {
-      return;
-    }
+    Assume.assumeFalse(parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE));
+
     HadoopDruidIndexerConfig config = transformHadoopDruidIndexerConfig(
         "example/decimals/dec_in_fix_len.json",
         parserType,
@@ -101,9 +101,8 @@ public class DecimalParquetInputTest extends BaseParquetInputTest
   public void testReadParquetDecimali32() throws IOException, InterruptedException
   {
     // parquet-avro does not correctly convert decimal types
-    if (parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE)) {
-      return;
-    }
+    Assume.assumeFalse(parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE));
+
     HadoopDruidIndexerConfig config = transformHadoopDruidIndexerConfig(
         "example/decimals/dec_in_i32.json",
         parserType,
@@ -148,9 +147,8 @@ public class DecimalParquetInputTest extends BaseParquetInputTest
   public void testReadParquetDecimali64() throws IOException, InterruptedException
   {
     // parquet-avro does not correctly convert decimal types
-    if (parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE)) {
-      return;
-    }
+    Assume.assumeFalse(parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE));
+
     HadoopDruidIndexerConfig config = transformHadoopDruidIndexerConfig(
         "example/decimals/dec_in_i64.json",
         parserType,


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