Skip to content

Commit 282464c

Browse files
change allocator from netty to unsafe to be compatible with Tableau
1 parent d00d58a commit 282464c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ apply plugin: 'java'
2727
apply plugin: 'com.diffplug.spotless'
2828

2929
group 'io.tiledb'
30-
version = '0.0.8-SNAPSHOT'
30+
version = '0.0.9-SNAPSHOT'
3131

3232
repositories {
3333
mavenCentral()
@@ -157,7 +157,7 @@ dependencies {
157157
implementation "jakarta.annotation:jakarta.annotation-api:$jakarta_annotation_version"
158158
implementation group: 'org.apache.arrow', name: 'arrow-vector', version: '9.0.0'
159159
implementation group: 'org.apache.arrow', name: 'arrow-compression', version: '9.0.0'
160-
implementation group: 'org.apache.arrow', name: 'arrow-memory-netty', version: '9.0.0'
160+
implementation group: 'org.apache.arrow', name: 'arrow-memory-unsafe', version: '9.0.0'
161161
implementation 'io.tiledb:tiledb-java:0.13.6'
162162
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.2'
163163
testImplementation 'org.mockito:mockito-core:3.12.4'

src/main/java/io/tiledb/cloud/TileDBSQL.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import io.tiledb.cloud.rest_api.api.SqlApi;
55
import io.tiledb.cloud.rest_api.model.SQLParameters;
66
import org.apache.arrow.memory.RootAllocator;
7+
import org.apache.arrow.memory.UnsafeAllocationManager;
78
import org.apache.arrow.vector.FieldVector;
89
import org.apache.arrow.vector.ValueVector;
910
import org.apache.arrow.vector.VectorSchemaRoot;
@@ -60,7 +61,8 @@ public io.tiledb.java.api.Pair<ArrayList<ValueVector>, Integer> execArrow(){
6061
ArrayList<ValueVector> valueVectors = null;
6162
int readBatchesCount = 0;
6263

63-
RootAllocator allocator = new RootAllocator(Long.MAX_VALUE);
64+
// RootAllocator allocator = new RootAllocator(Long.MAX_VALUE);
65+
RootAllocator allocator = new RootAllocator(RootAllocator.configBuilder().allocationManagerFactory(UnsafeAllocationManager.FACTORY).build());
6466
ArrowStreamReader reader = new ArrowStreamReader(new ByteArrayInputStream(bytes), allocator, CommonsCompressionFactory.INSTANCE);
6567

6668
VectorSchemaRoot root = reader.getVectorSchemaRoot();

0 commit comments

Comments
 (0)