public class NativeDatasetFactory extends Object implements DatasetFactory
DatasetFactory.| Constructor and Description |
|---|
NativeDatasetFactory(BufferAllocator allocator,
NativeMemoryPool memoryPool,
long datasetFactoryId)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close this factory by release the pointer of the native instance.
|
NativeDataset |
finish()
Create a Dataset with auto-inferred schema.
|
NativeDataset |
finish(Schema schema)
Create a Dataset with predefined schema.
|
Schema |
inspect()
Get unified schema for the resulting Dataset.
|
public NativeDatasetFactory(BufferAllocator allocator, NativeMemoryPool memoryPool, long datasetFactoryId)
allocator - a context allocator associated with this factory. Any buffer that will be created natively will
be then bound to this allocator.memoryPool - the native memory pool associated with this factory. Any buffer created natively should request
for memory spaces from this memory pool. This is a mapped instance of c++ arrow::MemoryPool.datasetFactoryId - an ID, at the same time the native pointer of the underlying native instance of this
factory. Make sure in c++ side the pointer is pointing to the shared pointer wrapping
the actual instance so we could successfully decrease the reference count once
close() is called.close()public Schema inspect()
DatasetFactoryinspect in interface DatasetFactorypublic NativeDataset finish()
DatasetFactoryDatasetFactory.inspect() manually.finish in interface DatasetFactorypublic NativeDataset finish(Schema schema)
DatasetFactoryfinish in interface DatasetFactoryschema - a predefined schemapublic void close()
close in interface AutoCloseableCopyright © 2023 The Apache Software Foundation. All rights reserved.