Skip to content

Commit 2a02f3e

Browse files
committed
remove more unused methods
1 parent 20cdc47 commit 2a02f3e

2 files changed

Lines changed: 0 additions & 59 deletions

File tree

spark/src/main/java/org/apache/comet/parquet/Native.java

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -25,62 +25,11 @@
2525

2626
public final class Native extends NativeBase {
2727

28-
///////////// Arrow Native Parquet Reader APIs
29-
3028
/**
3129
* Verify that object store options are valid. An exception will be thrown if the provided options
3230
* are not valid.
3331
*/
3432
public static native void validateObjectStoreConfig(
3533
String filePath, Map<String, String> objectStoreOptions);
3634

37-
/**
38-
* Initialize a record batch reader for a PartitionedFile
39-
*
40-
* @param filePath
41-
* @param starts
42-
* @param lengths
43-
* @return a handle to the record batch reader, used in subsequent calls.
44-
*/
45-
public static native long initRecordBatchReader(
46-
String filePath,
47-
long fileSize,
48-
long[] starts,
49-
long[] lengths,
50-
byte[] filter,
51-
byte[] requiredSchema,
52-
byte[] dataSchema,
53-
String sessionTimezone,
54-
int batchSize,
55-
boolean caseSensitive,
56-
boolean returnNullStructIfAllFieldsMissing,
57-
Map<String, String> objectStoreOptions,
58-
CometFileKeyUnwrapper keyUnwrapper,
59-
Object metricsNode);
60-
61-
/**
62-
* Read the next batch of data into memory on native side
63-
*
64-
* @param handle
65-
* @return the number of rows read
66-
*/
67-
public static native int readNextRecordBatch(long handle);
68-
69-
/**
70-
* Load the column corresponding to columnNum in the currently loaded record batch into JVM
71-
*
72-
* @param handle
73-
* @param columnNum
74-
* @param arrayAddr
75-
* @param schemaAddr
76-
*/
77-
public static native void currentColumnBatch(
78-
long handle, int columnNum, long arrayAddr, long schemaAddr);
79-
80-
/**
81-
* Close the record batch reader. Free the resources
82-
*
83-
* @param handle
84-
*/
85-
public static native void closeRecordBatchReader(long handle);
8635
}

spark/src/test/scala/org/apache/comet/CometNativeSuite.scala

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,6 @@ class CometNativeSuite extends CometTestBase {
5454
assert(exception.getMessage contains "java.lang.NullPointerException")
5555
}
5656

57-
test("handling NPE when closing null handle of parquet reader") {
58-
assert(NativeBase.isLoaded)
59-
val exception1 = intercept[NullPointerException] {
60-
parquet.Native.closeRecordBatchReader(0)
61-
}
62-
assert(exception1.getMessage contains "null batch context handle")
63-
}
64-
6557
test("Comet native should use spark local dir as temp dir") {
6658
withParquetTable((0 until 100000).map(i => (i, i + 1)), "table") {
6759
val dirs = SparkEnv.get.blockManager.getLocalDiskDirs

0 commit comments

Comments
 (0)