Skip to content

Commit 1461231

Browse files
committed
fix release arrowSchema issue
1 parent 8ccc105 commit 1461231

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

dataset/src/main/java/org/apache/arrow/dataset/file/ParquetWriter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ public ParquetWriter(
6666
try {
6767
// Convert Java Schema to Arrow C Data Interface Schema
6868
arrowSchemaLocal = ArrowSchema.allocateNew(this.allocator);
69+
this.arrowSchema = arrowSchemaLocal;
6970
Data.exportSchema(this.allocator, schema, null, arrowSchemaLocal);
7071
} catch (Exception e) {
7172
this.close();
7273
throw new IOException("Failed to convert schema to ArrowSchema: " + e.getMessage(), e);
7374
}
74-
this.arrowSchema = arrowSchemaLocal;
7575

7676
long ptr = jni.nativeCreateParquetWriter(outputStream, arrowSchema.memoryAddress(), properties);
7777

0 commit comments

Comments
 (0)