public final class AceroSubstraitConsumer extends Object
| Constructor and Description |
|---|
AceroSubstraitConsumer(BufferAllocator allocator) |
| Modifier and Type | Method and Description |
|---|---|
ArrowReader |
runQuery(ByteBuffer plan)
Run Substrait plan.
|
ArrowReader |
runQuery(ByteBuffer plan,
Map<String,ArrowReader> namedTables)
Read binary Substrait plan, execute and return an ArrowReader to read Schema and ArrowRecordBatches.
|
ArrowReader |
runQuery(String plan)
Run Substrait plan.
|
ArrowReader |
runQuery(String plan,
Map<String,ArrowReader> namedTables)
Run Substrait plan.
|
public AceroSubstraitConsumer(BufferAllocator allocator)
public ArrowReader runQuery(String plan) throws Exception
plan - The JSON Substrait plan.Exceptionpublic ArrowReader runQuery(String plan, Map<String,ArrowReader> namedTables) throws Exception
plan - The JSON Substrait plan.namedTables - A mapping of named tables referenced by the plan to an ArrowReader providing the data
for the table. Contains the Table Name to Query as a Key and ArrowReader as a Value.
ArrowReader nationReader = scanner.scanBatches();
Map<String, ArrowReader> namedTables = new HashMap<>();
namedTables.put("NATION", nationReader);Exceptionpublic ArrowReader runQuery(ByteBuffer plan) throws Exception
plan - the binary Substrait plan.Exceptionpublic ArrowReader runQuery(ByteBuffer plan, Map<String,ArrowReader> namedTables) throws Exception
plan - the binary Substrait plan.namedTables - A mapping of named tables referenced by the plan to an ArrowReader providing the data
for the table. Contains the Table Name to Query as a Key and ArrowReader as a Value.
ArrowReader nationReader = scanner.scanBatches();
Map<String, ArrowReader> namedTables = new HashMap<>();
namedTables.put("NATION", nationReader);ExceptionCopyright © 2024 The Apache Software Foundation. All rights reserved.