Module org.apache.arrow.dataset
Class AceroSubstraitConsumer
java.lang.Object
org.apache.arrow.dataset.substrait.AceroSubstraitConsumer
Class to expose Java Substrait API for end users, currently operations supported are only to
Consume Substrait Plan in Plan format (JSON) or Binary format (ByteBuffer).
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRun Substrait plan.runQuery
(String plan, Map<String, ArrowReader> namedTables) Run Substrait plan.runQuery
(ByteBuffer plan) Run Substrait plan.runQuery
(ByteBuffer plan, Map<String, ArrowReader> namedTables) Read binary Substrait plan, execute and return an ArrowReader to read Schema and ArrowRecordBatches.
-
Constructor Details
-
AceroSubstraitConsumer
-
-
Method Details
-
runQuery
Run Substrait plan.- Parameters:
plan
- The JSON Substrait plan.- Returns:
- the ArrowReader to iterate for record batches.
- Throws:
Exception
-
runQuery
Run Substrait plan.- Parameters:
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);
- Returns:
- the ArrowReader to iterate for record batches.
- Throws:
Exception
-
runQuery
Run Substrait plan.- Parameters:
plan
- the binary Substrait plan.- Returns:
- the ArrowReader to iterate for record batches.
- Throws:
Exception
-
runQuery
Read binary Substrait plan, execute and return an ArrowReader to read Schema and ArrowRecordBatches.- Parameters:
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);
- Returns:
- the ArrowReader to iterate for record batches.
- Throws:
Exception
-