Package org.apache.arrow.datafusion
Interface DataFrame
public interface DataFrame
A dataframe is a rectangle shaped data that holds columns and rows, and can be
collected into batches and read via reader.-
Method Summary
Modifier and TypeMethodDescriptionCompletableFuture<org.apache.arrow.vector.ipc.ArrowReader>collect(org.apache.arrow.memory.BufferAllocator allocator) Collect dataframe into a list of record batcheslongregisterTable(SessionContext context, String name) Register this dataframe as a temporary table.show()Print results.Write results to a csv file.writeParquet(Path path) Write results to a parquet file.
-
Method Details
-
collect
CompletableFuture<org.apache.arrow.vector.ipc.ArrowReader> collect(org.apache.arrow.memory.BufferAllocator allocator) Collect dataframe into a list of record batches- Parameters:
allocator-buffer allocatorto allocate vectors within Reader- Returns:
readerinstance to extract the data, you are expected toArrowReader.close()it after usage to release memory
-
show
CompletableFuture<Void> show()Print results.- Returns:
- null
-
writeParquet
Write results to a parquet file.- Parameters:
path- path to write parquet file to- Returns:
- null
-
writeCsv
Write results to a csv file.- Parameters:
path- path to write csv file to- Returns:
- null
-
registerTable
Register this dataframe as a temporary table.- Parameters:
context- SessionContext to register table toname- name of the tmp table- Returns:
- null
-
getPointer
long getPointer()
-