Skip to content

Commit

Permalink
ORC-1477: Removed unused imports
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
The PR proposes to remove unused imports from the code and remove the unusedImports rule from checkstyle-suppressions.xml to guard against future changes.

### Why are the changes needed?
Not having unused imports is a clean coding practice

### How was this patch tested?
All the Unit Test cases pass, all changes located inside test folders

Closes apache#1628 from mystic-lama/orc1477_unused_imports.

Authored-by: mystic-lama <mysticlama000@gmail.com>
Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
  • Loading branch information
paliwalashish authored and cxzl25 committed Jan 11, 2024
1 parent 16e5ac4 commit 4dd3a72
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 23 deletions.
1 change: 0 additions & 1 deletion java/checkstyle-suppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
<suppress checks="Indentation" files="src/test/org/apache/orc/tools/convert/TestJsonReader.java"/>
<suppress checks="Indentation" files="src/test/org/apache/orc/tools/json/TestJsonSchemaFinder.java"/>

<suppress checks="UnusedImports" files="src/test/*"/>
<suppress checks="AvoidStarImport" files="src/test/*"/>
<suppress checks="CustomImportOrder" files="src/test/*"/>
</suppressions>
1 change: 0 additions & 1 deletion java/core/src/test/org/apache/orc/TestMinSeekSize.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class TestMinSeekSize {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Random;
import java.util.Arrays;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import org.apache.orc.filter.BatchFilter;
import org.junit.jupiter.api.Test;

import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,12 @@
import org.apache.hadoop.hive.ql.io.sarg.SearchArgumentFactory;
import org.apache.orc.OrcConf;
import org.apache.orc.OrcFile;
import org.apache.orc.OrcFilterContext;
import org.apache.orc.Reader;
import org.apache.orc.TypeDescription;
import org.apache.orc.filter.BatchFilter;
import org.junit.jupiter.api.Test;

import java.util.Arrays;
import java.util.function.Consumer;

import static org.junit.jupiter.api.Assertions.assertArrayEquals;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertNull;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class TestPluginFilters extends ATestFilter {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,11 @@
import org.apache.hadoop.mapred.RecordWriter;
import org.apache.hadoop.mapred.Reporter;
import org.apache.hadoop.mapred.TaskAttemptContext;
import org.apache.hadoop.util.Progressable;
import org.apache.orc.CompressionKind;
import org.apache.orc.OrcConf;
import org.apache.orc.OrcFile;
import org.apache.orc.Reader;
import org.apache.orc.TypeDescription;
import org.apache.orc.Writer;
import org.junit.jupiter.api.Test;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package org.apache.orc.mapreduce;

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.ql.io.sarg.PredicateLeaf;
Expand All @@ -40,7 +39,6 @@
import org.apache.orc.OrcFile;
import org.apache.orc.Reader;
import org.apache.orc.TypeDescription;
import org.apache.orc.Writer;
import org.apache.orc.mapred.OrcKey;
import org.apache.orc.mapred.OrcStruct;
import org.apache.orc.mapred.OrcValue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import org.apache.hadoop.fs.FileStatus;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hive.ql.exec.vector.VectorizedRowBatch;
import org.apache.hadoop.io.DataInputBuffer;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.NullWritable;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,12 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.PrintStream;
import java.net.URL;
import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.util.Random;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNull;

public class TestJsonFileDump {

public static String getFileFromClasspath(String name) {
Expand Down

0 comments on commit 4dd3a72

Please sign in to comment.