Package org.apache.arrow.flight.sql
Class NoOpFlightSqlProducer
java.lang.Object
org.apache.arrow.flight.sql.NoOpFlightSqlProducer
- All Implemented Interfaces:
AutoCloseable
,FlightProducer
,FlightSqlProducer
- Direct Known Subclasses:
BasicFlightSqlProducer
A
FlightSqlProducer
that throws on all FlightSql-specific operations.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.arrow.flight.FlightProducer
FlightProducer.CallContext, FlightProducer.ServerStreamListener, FlightProducer.StreamListener<T>
Nested classes/interfaces inherited from interface org.apache.arrow.flight.sql.FlightSqlProducer
FlightSqlProducer.Schemas
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionacceptPutPreparedStatementQuery
(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Accepts uploaded parameter values for a particular prepared statement query.acceptPutPreparedStatementUpdate
(FlightSql.CommandPreparedStatementUpdate command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Accepts uploaded data for a particular prepared statement data stream.acceptPutStatement
(FlightSql.CommandStatementUpdate command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Accepts uploaded data for a particular SQL query based data stream.void
close()
void
closePreparedStatement
(FlightSql.ActionClosePreparedStatementRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Closes a prepared statement on the server.void
createPreparedStatement
(FlightSql.ActionCreatePreparedStatementRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Creates a prepared statement on the server and returns a handle and metadata for in aFlightSql.ActionCreatePreparedStatementResult
object in aResult
object.getFlightInfoCatalogs
(FlightSql.CommandGetCatalogs request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available catalogs by returning a stream ofFlightSql.CommandGetCatalogs
objects inResult
objects.getFlightInfoCrossReference
(FlightSql.CommandGetCrossReference request, FlightProducer.CallContext context, FlightDescriptor descriptor) Retrieve a description of the foreign key columns that reference the given table's primary key columnsFlightSql.CommandGetCrossReference
objects inResult
objects.getFlightInfoExportedKeys
(FlightSql.CommandGetExportedKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Retrieves a description of the foreign key columns that reference the given table's primary key columnsFlightSql.CommandGetExportedKeys
objects inResult
objects.getFlightInfoImportedKeys
(FlightSql.CommandGetImportedKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Retrieves a description of the primary key columns that are referenced by given table's foreign key columnsFlightSql.CommandGetImportedKeys
objects inResult
objects.getFlightInfoPreparedStatement
(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Gets information about a particular prepared statement data stream.getFlightInfoPrimaryKeys
(FlightSql.CommandGetPrimaryKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available primary keys by returning a stream ofFlightSql.CommandGetPrimaryKeys
objects inResult
objects.getFlightInfoSchemas
(FlightSql.CommandGetDbSchemas request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available schemas by returning a stream ofFlightSql.CommandGetDbSchemas
objects inResult
objects.getFlightInfoSqlInfo
(FlightSql.CommandGetSqlInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the SQL Info of the server by returning aFlightSql.CommandGetSqlInfo
in aResult
.getFlightInfoStatement
(FlightSql.CommandStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Evaluate a SQL query.getFlightInfoTables
(FlightSql.CommandGetTables request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available tables by returning a stream ofFlightSql.CommandGetTables
objects inResult
objects.getFlightInfoTableTypes
(FlightSql.CommandGetTableTypes request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available table types by returning a stream ofFlightSql.CommandGetTableTypes
objects inResult
objects.getFlightInfoTypeInfo
(FlightSql.CommandGetXdbcTypeInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns a description of all the data types supported by source.getSchemaStatement
(FlightSql.CommandStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Get the result schema for a SQL query.void
getStreamCatalogs
(FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for catalogs based data stream.void
getStreamCrossReference
(FlightSql.CommandGetCrossReference command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for cross reference based data stream.void
getStreamExportedKeys
(FlightSql.CommandGetExportedKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for foreign keys based data stream.void
getStreamImportedKeys
(FlightSql.CommandGetImportedKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for foreign keys based data stream.void
getStreamPreparedStatement
(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for a particular prepared statement query instance.void
getStreamPrimaryKeys
(FlightSql.CommandGetPrimaryKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for primary keys based data stream.void
getStreamSchemas
(FlightSql.CommandGetDbSchemas command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for schemas based data stream.void
getStreamSqlInfo
(FlightSql.CommandGetSqlInfo command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for SQL info based data stream.void
getStreamStatement
(FlightSql.TicketStatementQuery ticket, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for a SQL query based data stream.void
getStreamTables
(FlightSql.CommandGetTables command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for tables based data stream.void
getStreamTableTypes
(FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for table types based data stream.void
getStreamTypeInfo
(FlightSql.CommandGetXdbcTypeInfo request, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Returns data for type info based data stream.void
listFlights
(FlightProducer.CallContext context, Criteria criteria, FlightProducer.StreamListener<FlightInfo> listener) List available data streams on this service.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.arrow.flight.FlightProducer
doExchange, pollFlightInfo
Methods inherited from interface org.apache.arrow.flight.sql.FlightSqlProducer
acceptPut, acceptPutSubstraitPlan, beginSavepoint, beginTransaction, cancelFlightInfo, cancelQuery, closeSession, createPreparedSubstraitPlan, doAction, endSavepoint, endTransaction, getFlightInfo, getFlightInfoSubstraitPlan, getSchema, getSchemaPreparedStatement, getSchemaSubstraitPlan, getSessionOptions, getStream, listActions, renewFlightEndpoint, setSessionOptions
-
Constructor Details
-
NoOpFlightSqlProducer
public NoOpFlightSqlProducer()
-
-
Method Details
-
createPreparedStatement
public void createPreparedStatement(FlightSql.ActionCreatePreparedStatementRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Description copied from interface:FlightSqlProducer
Creates a prepared statement on the server and returns a handle and metadata for in aFlightSql.ActionCreatePreparedStatementResult
object in aResult
object.- Specified by:
createPreparedStatement
in interfaceFlightSqlProducer
- Parameters:
request
- The sql command to generate the prepared statement.context
- Per-call context.listener
- A stream of responses.
-
closePreparedStatement
public void closePreparedStatement(FlightSql.ActionClosePreparedStatementRequest request, FlightProducer.CallContext context, FlightProducer.StreamListener<Result> listener) Description copied from interface:FlightSqlProducer
Closes a prepared statement on the server. No result is expected.- Specified by:
closePreparedStatement
in interfaceFlightSqlProducer
- Parameters:
request
- The sql command to generate the prepared statement.context
- Per-call context.listener
- A stream of responses.
-
getFlightInfoStatement
public FlightInfo getFlightInfoStatement(FlightSql.CommandStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Evaluate a SQL query.- Specified by:
getFlightInfoStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The SQL query.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getFlightInfoPreparedStatement
public FlightInfo getFlightInfoPreparedStatement(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Gets information about a particular prepared statement data stream.- Specified by:
getFlightInfoPreparedStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The prepared statement to generate the data stream.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getSchemaStatement
public SchemaResult getSchemaStatement(FlightSql.CommandStatementQuery command, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Get the result schema for a SQL query.- Specified by:
getSchemaStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The SQL query.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- the schema of the result set.
-
getStreamStatement
public void getStreamStatement(FlightSql.TicketStatementQuery ticket, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for a SQL query based data stream.- Specified by:
getStreamStatement
in interfaceFlightSqlProducer
- Parameters:
ticket
- Ticket message containing the statement handle.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getStreamPreparedStatement
public void getStreamPreparedStatement(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for a particular prepared statement query instance.- Specified by:
getStreamPreparedStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The prepared statement to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
acceptPutStatement
public Runnable acceptPutStatement(FlightSql.CommandStatementUpdate command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Description copied from interface:FlightSqlProducer
Accepts uploaded data for a particular SQL query based data stream.`PutResult`s must be in the form of a
FlightSql.DoPutUpdateResult
.- Specified by:
acceptPutStatement
in interfaceFlightSqlProducer
- Parameters:
command
- The sql command to generate the data stream.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.- Returns:
- A runnable to process the stream.
-
acceptPutPreparedStatementUpdate
public Runnable acceptPutPreparedStatementUpdate(FlightSql.CommandPreparedStatementUpdate command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Description copied from interface:FlightSqlProducer
Accepts uploaded data for a particular prepared statement data stream.`PutResult`s must be in the form of a
FlightSql.DoPutUpdateResult
.- Specified by:
acceptPutPreparedStatementUpdate
in interfaceFlightSqlProducer
- Parameters:
command
- The prepared statement to generate the data stream.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.- Returns:
- A runnable to process the stream.
-
acceptPutPreparedStatementQuery
public Runnable acceptPutPreparedStatementQuery(FlightSql.CommandPreparedStatementQuery command, FlightProducer.CallContext context, FlightStream flightStream, FlightProducer.StreamListener<PutResult> ackStream) Description copied from interface:FlightSqlProducer
Accepts uploaded parameter values for a particular prepared statement query.- Specified by:
acceptPutPreparedStatementQuery
in interfaceFlightSqlProducer
- Parameters:
command
- The prepared statement the parameter values will bind to.context
- Per-call context.flightStream
- The data stream being uploaded.ackStream
- The result data stream.- Returns:
- A runnable to process the stream.
-
getFlightInfoSqlInfo
public FlightInfo getFlightInfoSqlInfo(FlightSql.CommandGetSqlInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the SQL Info of the server by returning aFlightSql.CommandGetSqlInfo
in aResult
.- Specified by:
getFlightInfoSqlInfo
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamSqlInfo
public void getStreamSqlInfo(FlightSql.CommandGetSqlInfo command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for SQL info based data stream.- Specified by:
getStreamSqlInfo
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoTypeInfo
public FlightInfo getFlightInfoTypeInfo(FlightSql.CommandGetXdbcTypeInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns a description of all the data types supported by source.- Specified by:
getFlightInfoTypeInfo
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamTypeInfo
public void getStreamTypeInfo(FlightSql.CommandGetXdbcTypeInfo request, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for type info based data stream.- Specified by:
getStreamTypeInfo
in interfaceFlightSqlProducer
context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoCatalogs
public FlightInfo getFlightInfoCatalogs(FlightSql.CommandGetCatalogs request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the available catalogs by returning a stream ofFlightSql.CommandGetCatalogs
objects inResult
objects.- Specified by:
getFlightInfoCatalogs
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamCatalogs
public void getStreamCatalogs(FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for catalogs based data stream.- Specified by:
getStreamCatalogs
in interfaceFlightSqlProducer
- Parameters:
context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoSchemas
public FlightInfo getFlightInfoSchemas(FlightSql.CommandGetDbSchemas request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the available schemas by returning a stream ofFlightSql.CommandGetDbSchemas
objects inResult
objects.- Specified by:
getFlightInfoSchemas
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamSchemas
public void getStreamSchemas(FlightSql.CommandGetDbSchemas command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for schemas based data stream.- Specified by:
getStreamSchemas
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoTables
public FlightInfo getFlightInfoTables(FlightSql.CommandGetTables request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the available tables by returning a stream ofFlightSql.CommandGetTables
objects inResult
objects.- Specified by:
getFlightInfoTables
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamTables
public void getStreamTables(FlightSql.CommandGetTables command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for tables based data stream.- Specified by:
getStreamTables
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoTableTypes
public FlightInfo getFlightInfoTableTypes(FlightSql.CommandGetTableTypes request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the available table types by returning a stream ofFlightSql.CommandGetTableTypes
objects inResult
objects.- Specified by:
getFlightInfoTableTypes
in interfaceFlightSqlProducer
context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamTableTypes
public void getStreamTableTypes(FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for table types based data stream.- Specified by:
getStreamTableTypes
in interfaceFlightSqlProducer
- Parameters:
context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoPrimaryKeys
public FlightInfo getFlightInfoPrimaryKeys(FlightSql.CommandGetPrimaryKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Returns the available primary keys by returning a stream ofFlightSql.CommandGetPrimaryKeys
objects inResult
objects.- Specified by:
getFlightInfoPrimaryKeys
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamPrimaryKeys
public void getStreamPrimaryKeys(FlightSql.CommandGetPrimaryKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for primary keys based data stream.- Specified by:
getStreamPrimaryKeys
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getFlightInfoExportedKeys
public FlightInfo getFlightInfoExportedKeys(FlightSql.CommandGetExportedKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Retrieves a description of the foreign key columns that reference the given table's primary key columnsFlightSql.CommandGetExportedKeys
objects inResult
objects.- Specified by:
getFlightInfoExportedKeys
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getFlightInfoImportedKeys
public FlightInfo getFlightInfoImportedKeys(FlightSql.CommandGetImportedKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Retrieves a description of the primary key columns that are referenced by given table's foreign key columnsFlightSql.CommandGetImportedKeys
objects inResult
objects.- Specified by:
getFlightInfoImportedKeys
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getFlightInfoCrossReference
public FlightInfo getFlightInfoCrossReference(FlightSql.CommandGetCrossReference request, FlightProducer.CallContext context, FlightDescriptor descriptor) Description copied from interface:FlightSqlProducer
Retrieve a description of the foreign key columns that reference the given table's primary key columnsFlightSql.CommandGetCrossReference
objects inResult
objects.- Specified by:
getFlightInfoCrossReference
in interfaceFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
getStreamExportedKeys
public void getStreamExportedKeys(FlightSql.CommandGetExportedKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for foreign keys based data stream.- Specified by:
getStreamExportedKeys
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getStreamImportedKeys
public void getStreamImportedKeys(FlightSql.CommandGetImportedKeys command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for foreign keys based data stream.- Specified by:
getStreamImportedKeys
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
getStreamCrossReference
public void getStreamCrossReference(FlightSql.CommandGetCrossReference command, FlightProducer.CallContext context, FlightProducer.ServerStreamListener listener) Description copied from interface:FlightSqlProducer
Returns data for cross reference based data stream.- Specified by:
getStreamCrossReference
in interfaceFlightSqlProducer
- Parameters:
command
- The command to generate the data stream.context
- Per-call context.listener
- An interface for sending data back to the client.
-
close
- Specified by:
close
in interfaceAutoCloseable
- Throws:
Exception
-
listFlights
public void listFlights(FlightProducer.CallContext context, Criteria criteria, FlightProducer.StreamListener<FlightInfo> listener) Description copied from interface:FlightProducer
List available data streams on this service.- Specified by:
listFlights
in interfaceFlightProducer
- Parameters:
context
- Per-call context.criteria
- Application-defined criteria for filtering streams.listener
- An interface for sending data back to the client.
-