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
Constructors -
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.CommandGetCatalogsobjects inResultobjects.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.CommandGetCrossReferenceobjects inResultobjects.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.CommandGetExportedKeysobjects inResultobjects.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.CommandGetImportedKeysobjects inResultobjects.getFlightInfoPrimaryKeys(FlightSql.CommandGetPrimaryKeys request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available primary keys by returning a stream ofFlightSql.CommandGetPrimaryKeysobjects inResultobjects.getFlightInfoSchemas(FlightSql.CommandGetDbSchemas request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available schemas by returning a stream ofFlightSql.CommandGetDbSchemasobjects inResultobjects.getFlightInfoSqlInfo(FlightSql.CommandGetSqlInfo request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the SQL Info of the server by returning aFlightSql.CommandGetSqlInfoin aResult.getFlightInfoTables(FlightSql.CommandGetTables request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available tables by returning a stream ofFlightSql.CommandGetTablesobjects inResultobjects.getFlightInfoTableTypes(FlightSql.CommandGetTableTypes request, FlightProducer.CallContext context, FlightDescriptor descriptor) Returns the available table types by returning a stream ofFlightSql.CommandGetTableTypesobjects inResultobjects.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, listFlightsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.arrow.flight.FlightProducer
doExchange, pollFlightInfoMethods 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:FlightSqlProducerReturns the SQL Info of the server by returning aFlightSql.CommandGetSqlInfoin aResult.- Specified by:
getFlightInfoSqlInfoin interfaceFlightSqlProducer- Overrides:
getFlightInfoSqlInfoin 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:FlightSqlProducerReturns a description of all the data types supported by source.- Specified by:
getFlightInfoTypeInfoin interfaceFlightSqlProducer- Overrides:
getFlightInfoTypeInfoin 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:FlightSqlProducerReturns the available catalogs by returning a stream ofFlightSql.CommandGetCatalogsobjects inResultobjects.- Specified by:
getFlightInfoCatalogsin interfaceFlightSqlProducer- Overrides:
getFlightInfoCatalogsin 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:FlightSqlProducerReturns the available schemas by returning a stream ofFlightSql.CommandGetDbSchemasobjects inResultobjects.- Specified by:
getFlightInfoSchemasin interfaceFlightSqlProducer- Overrides:
getFlightInfoSchemasin 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:FlightSqlProducerReturns the available tables by returning a stream ofFlightSql.CommandGetTablesobjects inResultobjects.- Specified by:
getFlightInfoTablesin interfaceFlightSqlProducer- Overrides:
getFlightInfoTablesin 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:FlightSqlProducerReturns the available table types by returning a stream ofFlightSql.CommandGetTableTypesobjects inResultobjects.- Specified by:
getFlightInfoTableTypesin interfaceFlightSqlProducer- Overrides:
getFlightInfoTableTypesin classNoOpFlightSqlProducercontext- 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:FlightSqlProducerReturns the available primary keys by returning a stream ofFlightSql.CommandGetPrimaryKeysobjects inResultobjects.- Specified by:
getFlightInfoPrimaryKeysin interfaceFlightSqlProducer- Overrides:
getFlightInfoPrimaryKeysin 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:FlightSqlProducerRetrieves a description of the foreign key columns that reference the given table's primary key columnsFlightSql.CommandGetExportedKeysobjects inResultobjects.- Specified by:
getFlightInfoExportedKeysin interfaceFlightSqlProducer- Overrides:
getFlightInfoExportedKeysin 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:FlightSqlProducerRetrieves a description of the primary key columns that are referenced by given table's foreign key columnsFlightSql.CommandGetImportedKeysobjects inResultobjects.- Specified by:
getFlightInfoImportedKeysin interfaceFlightSqlProducer- Overrides:
getFlightInfoImportedKeysin 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:FlightSqlProducerRetrieve a description of the foreign key columns that reference the given table's primary key columnsFlightSql.CommandGetCrossReferenceobjects inResultobjects.- Specified by:
getFlightInfoCrossReferencein interfaceFlightSqlProducer- Overrides:
getFlightInfoCrossReferencein 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)
-