From 621525a5cb32311d1740ae9793c04c129fca6482 Mon Sep 17 00:00:00 2001 From: Codegass Date: Tue, 14 May 2024 11:43:07 -0400 Subject: [PATCH] Refactor: Clean up `DecimalParquetInputTest` using Assume (#16436) --- .../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 37c99f53baf8..f4e8a856d874 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 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 DecimalParquetInputTest(String parserType) 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 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; - } + 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 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; - } + Assume.assumeFalse(parserType.equals(ParquetExtensionsModule.PARQUET_AVRO_INPUT_PARSER_TYPE)); + HadoopDruidIndexerConfig config = transformHadoopDruidIndexerConfig( "example/decimals/dec_in_i64.json", parserType,