java.lang.Object
org.apache.arrow.flight.sql.NoOpFlightSqlProducer
org.apache.arrow.flight.sql.BasicFlightSqlProducer
- All Implemented Interfaces:
AutoCloseable
,FlightProducer
,FlightSqlProducer
A
FlightSqlProducer
that implements getting FlightInfo for each metadata request.-
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 TypeMethodDescriptionprotected abstract <T extends com.google.protobuf.Message>
List<FlightEndpoint>determineEndpoints
(T request, FlightDescriptor flightDescriptor, Schema schema) Return a list of FlightEndpoints for the given request and FlightDescriptor.protected <T extends com.google.protobuf.Message>
FlightInfogenerateFlightInfo
(T request, FlightDescriptor descriptor, Schema schema) 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.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
.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.Methods inherited from class org.apache.arrow.flight.sql.NoOpFlightSqlProducer
acceptPutPreparedStatementQuery, acceptPutPreparedStatementUpdate, acceptPutStatement, acceptPutStatementBulkIngest, close, closePreparedStatement, createPreparedStatement, getFlightInfoPreparedStatement, getFlightInfoStatement, getSchemaStatement, getStreamCatalogs, getStreamCrossReference, getStreamExportedKeys, getStreamImportedKeys, getStreamPreparedStatement, getStreamPrimaryKeys, getStreamSchemas, getStreamSqlInfo, getStreamStatement, getStreamTables, getStreamTableTypes, getStreamTypeInfo, listFlights
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
-
BasicFlightSqlProducer
public BasicFlightSqlProducer()
-
-
Method Details
-
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
- Overrides:
getFlightInfoSqlInfo
in classNoOpFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
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
- Overrides:
getFlightInfoTypeInfo
in classNoOpFlightSqlProducer
- Parameters:
request
- request filter parameters.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
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
- Overrides:
getFlightInfoCatalogs
in classNoOpFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
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
- Overrides:
getFlightInfoSchemas
in classNoOpFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
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
- Overrides:
getFlightInfoTables
in classNoOpFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
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
- Overrides:
getFlightInfoTableTypes
in classNoOpFlightSqlProducer
context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
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
- Overrides:
getFlightInfoPrimaryKeys
in classNoOpFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
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
- Overrides:
getFlightInfoExportedKeys
in classNoOpFlightSqlProducer
- 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
- Overrides:
getFlightInfoImportedKeys
in classNoOpFlightSqlProducer
- 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
- Overrides:
getFlightInfoCrossReference
in classNoOpFlightSqlProducer
- Parameters:
request
- request filter parameters.context
- Per-call context.descriptor
- The descriptor identifying the data stream.- Returns:
- Metadata about the stream.
-
determineEndpoints
protected abstract <T extends com.google.protobuf.Message> List<FlightEndpoint> determineEndpoints(T request, FlightDescriptor flightDescriptor, Schema schema) Return a list of FlightEndpoints for the given request and FlightDescriptor. This method should validate that the request is supported by this FlightSqlProducer. -
generateFlightInfo
protected <T extends com.google.protobuf.Message> FlightInfo generateFlightInfo(T request, FlightDescriptor descriptor, Schema schema)
-