- All Implemented Interfaces:
- AutoCloseable
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic classClass to encapsulate Flight SQL bulk ingest request options.static classHelper class to encapsulate Flight SQL prepared statement logic.static classA handle for an active savepoint.static final classA wrapper around a Substrait plan and a Substrait version.static classA handle for an active transaction.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbeginSavepoint(FlightSqlClient.Transaction transaction, String name, CallOption... options) Create a savepoint within a transaction.beginTransaction(CallOption... options) Begin a transaction.cancelFlightInfo(CancelFlightInfoRequest request, CallOption... options) Cancel execution of a distributed query.cancelQuery(FlightInfo info, CallOption... options) Deprecated.voidclose()closeSession(CloseSessionRequest request, CallOption... options) voidcommit(FlightSqlClient.Transaction transaction, CallOption... options) Commit a transaction.execute(String query, CallOption... options) Execute a query on the server.execute(String query, FlightSqlClient.Transaction transaction, CallOption... options) Execute a query on the server.longexecuteIngest(ArrowStreamReader dataReader, FlightSqlClient.ExecuteIngestOptions ingestOptions, CallOption... options) Execute a bulk ingest on the server.longexecuteIngest(ArrowStreamReader dataReader, FlightSqlClient.ExecuteIngestOptions ingestOptions, FlightSqlClient.Transaction transaction, CallOption... options) Execute a bulk ingest on the server.longexecuteIngest(VectorSchemaRoot data, FlightSqlClient.ExecuteIngestOptions ingestOptions, CallOption... options) Execute a bulk ingest on the server.longexecuteIngest(VectorSchemaRoot data, FlightSqlClient.ExecuteIngestOptions ingestOptions, FlightSqlClient.Transaction transaction, CallOption... options) Execute a bulk ingest on the server.executeSubstrait(FlightSqlClient.SubstraitPlan plan, CallOption... options) Execute a Substrait plan on the server.executeSubstrait(FlightSqlClient.SubstraitPlan plan, FlightSqlClient.Transaction transaction, CallOption... options) Execute a Substrait plan on the server.longexecuteSubstraitUpdate(FlightSqlClient.SubstraitPlan plan, CallOption... options) Execute an update query on the server.longexecuteSubstraitUpdate(FlightSqlClient.SubstraitPlan plan, FlightSqlClient.Transaction transaction, CallOption... options) Execute an update query on the server.longexecuteUpdate(String query, CallOption... options) Execute an update query on the server.longexecuteUpdate(String query, FlightSqlClient.Transaction transaction, CallOption... options) Execute an update query on the server.getCatalogs(CallOption... options) Request a list of catalogs.getCatalogsSchema(CallOption... options) Get the schema ofgetCatalogs(CallOption...)from the server.getCrossReference(TableRef pkTableRef, TableRef fkTableRef, CallOption... options) Retrieves a description of the foreign key columns that reference the given table's primary key columns (the foreign keys exported by a table).getCrossReferenceSchema(CallOption... options) Get the schema ofgetCrossReference(TableRef, TableRef, CallOption...)from the server.getExecuteSchema(String query, CallOption... options) Get the schema of the result set of a query.getExecuteSchema(String query, FlightSqlClient.Transaction transaction, CallOption... options) Get the schema of the result set of a query.getExecuteSubstraitSchema(FlightSqlClient.SubstraitPlan substraitPlan, CallOption... options) Get the schema of the result set of a Substrait plan.getExecuteSubstraitSchema(FlightSqlClient.SubstraitPlan plan, FlightSqlClient.Transaction transaction, CallOption... options) Get the schema of the result set of a Substrait plan.getExportedKeys(TableRef tableRef, CallOption... options) Retrieves a description about the foreign key columns that reference the primary key columns of the given table.getExportedKeysSchema(CallOption... options) Get the schema ofgetExportedKeys(TableRef, CallOption...)from the server.getImportedKeys(TableRef tableRef, CallOption... options) Retrieves the foreign key columns for the given table.getImportedKeysSchema(CallOption... options) Get the schema ofgetImportedKeys(TableRef, CallOption...)from the server.getPrimaryKeys(TableRef tableRef, CallOption... options) Request the primary keys for a table.getPrimaryKeysSchema(CallOption... options) Get the schema ofgetPrimaryKeys(TableRef, CallOption...)from the server.getSchema(FlightDescriptor descriptor, CallOption... options) Get schema for a stream.getSchemas(String catalog, String dbSchemaFilterPattern, CallOption... options) Request a list of schemas.getSchemasSchema(CallOption... options) Get the schema ofgetSchemas(String, String, CallOption...)from the server.getSessionOptions(GetSessionOptionsRequest request, CallOption... options) getSqlInfo(int[] info, CallOption... options) Request a set of Flight SQL metadata.getSqlInfo(Iterable<Integer> info, CallOption... options) Request a set of Flight SQL metadata.getSqlInfo(FlightSql.SqlInfo... info) Request a set of Flight SQL metadata.getSqlInfo(FlightSql.SqlInfo[] info, CallOption... options) Request a set of Flight SQL metadata.getSqlInfoSchema(CallOption... options) Get the schema ofgetSqlInfo(SqlInfo...)from the server.getStream(Ticket ticket, CallOption... options) Retrieve a stream from the server.getTables(String catalog, String dbSchemaFilterPattern, String tableFilterPattern, List<String> tableTypes, boolean includeSchema, CallOption... options) Request a list of tables.getTablesSchema(boolean includeSchema, CallOption... options) Get the schema ofgetTables(String, String, String, List, boolean, CallOption...)from the server.getTableTypes(CallOption... options) Request a list of table types.getTableTypesSchema(CallOption... options) Get the schema ofgetTableTypes(CallOption...)from the server.getXdbcTypeInfo(int dataType, CallOption... options) Request the information about the data types supported related to a filter data type.getXdbcTypeInfo(CallOption... options) Request the information about all the data types supported.getXdbcTypeInfoSchema(CallOption... options) Get the schema ofgetXdbcTypeInfo(CallOption...)from the server.prepare(String query, CallOption... options) Create a prepared statement for a SQL query on the server.prepare(String query, FlightSqlClient.Transaction transaction, CallOption... options) Create a prepared statement for a SQL query on the server.prepare(FlightSqlClient.SubstraitPlan plan, CallOption... options) Create a prepared statement for a Substrait plan on the server.prepare(FlightSqlClient.SubstraitPlan plan, FlightSqlClient.Transaction transaction, CallOption... options) Create a prepared statement for a Substrait plan on the server.voidrelease(FlightSqlClient.Savepoint savepoint, CallOption... options) Release a savepoint.renewFlightEndpoint(RenewFlightEndpointRequest request, CallOption... options) Request the server to extend the lifetime of a query result set.voidrollback(FlightSqlClient.Savepoint savepoint, CallOption... options) Rollback to a savepoint.voidrollback(FlightSqlClient.Transaction transaction, CallOption... options) Rollback a transaction.setSessionOptions(SetSessionOptionsRequest request, CallOption... options) 
- 
Constructor Details- 
FlightSqlClient
 
- 
- 
Method Details- 
executeExecute a query on the server.- Parameters:
- query- The query to execute.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
executepublic FlightInfo execute(String query, FlightSqlClient.Transaction transaction, CallOption... options) Execute a query on the server.- Parameters:
- query- The query to execute.
- transaction- The transaction that this query is part of.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
executeSubstraitExecute a Substrait plan on the server.- Parameters:
- plan- The Substrait plan to execute.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
executeSubstraitpublic FlightInfo executeSubstrait(FlightSqlClient.SubstraitPlan plan, FlightSqlClient.Transaction transaction, CallOption... options) Execute a Substrait plan on the server.- Parameters:
- plan- The Substrait plan to execute.
- transaction- The transaction that this query is part of.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getExecuteSchemapublic SchemaResult getExecuteSchema(String query, FlightSqlClient.Transaction transaction, CallOption... options) Get the schema of the result set of a query.
- 
getExecuteSchemaGet the schema of the result set of a query.
- 
getExecuteSubstraitSchemapublic SchemaResult getExecuteSubstraitSchema(FlightSqlClient.SubstraitPlan plan, FlightSqlClient.Transaction transaction, CallOption... options) Get the schema of the result set of a Substrait plan.
- 
getExecuteSubstraitSchemapublic SchemaResult getExecuteSubstraitSchema(FlightSqlClient.SubstraitPlan substraitPlan, CallOption... options) Get the schema of the result set of a Substrait plan.
- 
executeIngestpublic long executeIngest(VectorSchemaRoot data, FlightSqlClient.ExecuteIngestOptions ingestOptions, CallOption... options) Execute a bulk ingest on the server.- Parameters:
- data- data to be ingested
- ingestOptions- options for the ingest request.
- options- RPC-layer hints for this call.
- Returns:
- the number of rows affected.
 
- 
executeIngestpublic long executeIngest(ArrowStreamReader dataReader, FlightSqlClient.ExecuteIngestOptions ingestOptions, CallOption... options) Execute a bulk ingest on the server.- Parameters:
- dataReader- data stream to be ingested
- ingestOptions- options for the ingest request.
- options- RPC-layer hints for this call.
- Returns:
- the number of rows affected.
 
- 
executeIngestpublic long executeIngest(VectorSchemaRoot data, FlightSqlClient.ExecuteIngestOptions ingestOptions, FlightSqlClient.Transaction transaction, CallOption... options) Execute a bulk ingest on the server.- Parameters:
- data- data to be ingested
- ingestOptions- options for the ingest request.
- transaction- The transaction that this ingest request is part of.
- options- RPC-layer hints for this call.
- Returns:
- the number of rows affected.
 
- 
executeIngestpublic long executeIngest(ArrowStreamReader dataReader, FlightSqlClient.ExecuteIngestOptions ingestOptions, FlightSqlClient.Transaction transaction, CallOption... options) Execute a bulk ingest on the server.- Parameters:
- dataReader- data stream to be ingested
- ingestOptions- options for the ingest request.
- transaction- The transaction that this ingest request is part of.
- options- RPC-layer hints for this call.
- Returns:
- the number of rows affected.
 
- 
executeUpdateExecute an update query on the server.- Parameters:
- query- The query to execute.
- options- RPC-layer hints for this call.
- Returns:
- the number of rows affected.
 
- 
executeUpdatepublic long executeUpdate(String query, FlightSqlClient.Transaction transaction, CallOption... options) Execute an update query on the server.- Parameters:
- query- The query to execute.
- transaction- The transaction that this query is part of.
- options- RPC-layer hints for this call.
- Returns:
- the number of rows affected.
 
- 
executeSubstraitUpdateExecute an update query on the server.- Parameters:
- plan- The Substrait plan to execute.
- options- RPC-layer hints for this call.
- Returns:
- the number of rows affected.
 
- 
executeSubstraitUpdatepublic long executeSubstraitUpdate(FlightSqlClient.SubstraitPlan plan, FlightSqlClient.Transaction transaction, CallOption... options) Execute an update query on the server.- Parameters:
- plan- The Substrait plan to execute.
- transaction- The transaction that this query is part of.
- options- RPC-layer hints for this call.
- Returns:
- the number of rows affected.
 
- 
getCatalogsRequest a list of catalogs.- Parameters:
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getCatalogsSchemaGet the schema ofgetCatalogs(CallOption...)from the server.Should be identical to FlightSqlProducer.Schemas.GET_CATALOGS_SCHEMA.
- 
getSchemasRequest a list of schemas.- Parameters:
- catalog- The catalog.
- dbSchemaFilterPattern- The schema filter pattern.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getSchemasSchemaGet the schema ofgetSchemas(String, String, CallOption...)from the server.Should be identical to FlightSqlProducer.Schemas.GET_SCHEMAS_SCHEMA.
- 
getSchemaGet schema for a stream.- Parameters:
- descriptor- The descriptor for the stream.
- options- RPC-layer hints for this call.
 
- 
getStreamRetrieve a stream from the server.- Parameters:
- ticket- The ticket granting access to the data stream.
- options- RPC-layer hints for this call.
 
- 
getSqlInfoRequest a set of Flight SQL metadata.- Parameters:
- info- The set of metadata to retrieve. None to retrieve all metadata.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getSqlInfoRequest a set of Flight SQL metadata.- Parameters:
- info- The set of metadata to retrieve. None to retrieve all metadata.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getSqlInfoRequest a set of Flight SQL metadata. Use this method if you would like to retrieve custom metadata, where the custom metadata key values start from 10_000.- Parameters:
- info- The set of metadata to retrieve. None to retrieve all metadata.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getSqlInfoRequest a set of Flight SQL metadata. Use this method if you would like to retrieve custom metadata, where the custom metadata key values start from 10_000.- Parameters:
- info- The set of metadata to retrieve. None to retrieve all metadata.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getSqlInfoSchemaGet the schema ofgetSqlInfo(SqlInfo...)from the server.Should be identical to FlightSqlProducer.Schemas.GET_SQL_INFO_SCHEMA.
- 
getXdbcTypeInfoRequest the information about the data types supported related to a filter data type.- Parameters:
- dataType- the data type to be used as filter.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getXdbcTypeInfoRequest the information about all the data types supported.- Parameters:
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getXdbcTypeInfoSchemaGet the schema ofgetXdbcTypeInfo(CallOption...)from the server.Should be identical to FlightSqlProducer.Schemas.GET_TYPE_INFO_SCHEMA.
- 
getTablespublic FlightInfo getTables(String catalog, String dbSchemaFilterPattern, String tableFilterPattern, List<String> tableTypes, boolean includeSchema, CallOption... options) Request a list of tables.- Parameters:
- catalog- The catalog.
- dbSchemaFilterPattern- The schema filter pattern.
- tableFilterPattern- The table filter pattern.
- tableTypes- The table types to include.
- includeSchema- True to include the schema upon return, false to not include the schema.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getTablesSchemaGet the schema ofgetTables(String, String, String, List, boolean, CallOption...)from the server.Should be identical to FlightSqlProducer.Schemas.GET_TABLES_SCHEMAorFlightSqlProducer.Schemas.GET_TABLES_SCHEMA_NO_SCHEMA.
- 
getPrimaryKeysRequest the primary keys for a table.- Parameters:
- tableRef- An object which hold info about catalog, dbSchema and table.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getPrimaryKeysSchemaGet the schema ofgetPrimaryKeys(TableRef, CallOption...)from the server.Should be identical to FlightSqlProducer.Schemas.GET_PRIMARY_KEYS_SCHEMA.
- 
getExportedKeysRetrieves a description about the foreign key columns that reference the primary key columns of the given table.- Parameters:
- tableRef- An object which hold info about catalog, dbSchema and table.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getExportedKeysSchemaGet the schema ofgetExportedKeys(TableRef, CallOption...)from the server.Should be identical to FlightSqlProducer.Schemas.GET_EXPORTED_KEYS_SCHEMA.
- 
getImportedKeysRetrieves the foreign key columns for the given table.- Parameters:
- tableRef- An object which hold info about catalog, dbSchema and table.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getImportedKeysSchemaGet the schema ofgetImportedKeys(TableRef, CallOption...)from the server.Should be identical to FlightSqlProducer.Schemas.GET_IMPORTED_KEYS_SCHEMA.
- 
getCrossReferencepublic FlightInfo getCrossReference(TableRef pkTableRef, TableRef fkTableRef, CallOption... options) Retrieves a description of the foreign key columns that reference the given table's primary key columns (the foreign keys exported by a table).- Parameters:
- pkTableRef- An object which hold info about catalog, dbSchema and table from a primary table.
- fkTableRef- An object which hold info about catalog, dbSchema and table from a foreign table.
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getCrossReferenceSchemaGet the schema ofgetCrossReference(TableRef, TableRef, CallOption...)from the server.Should be identical to FlightSqlProducer.Schemas.GET_CROSS_REFERENCE_SCHEMA.
- 
getTableTypesRequest a list of table types.- Parameters:
- options- RPC-layer hints for this call.
- Returns:
- a FlightInfo object representing the stream(s) to fetch.
 
- 
getTableTypesSchemaGet the schema ofgetTableTypes(CallOption...)from the server.Should be identical to FlightSqlProducer.Schemas.GET_TABLE_TYPES_SCHEMA.
- 
prepareCreate a prepared statement for a SQL query on the server.- Parameters:
- query- The query to prepare.
- options- RPC-layer hints for this call.
- Returns:
- The representation of the prepared statement which exists on the server.
 
- 
preparepublic FlightSqlClient.PreparedStatement prepare(String query, FlightSqlClient.Transaction transaction, CallOption... options) Create a prepared statement for a SQL query on the server.- Parameters:
- query- The query to prepare.
- transaction- The transaction that this query is part of.
- options- RPC-layer hints for this call.
- Returns:
- The representation of the prepared statement which exists on the server.
 
- 
preparepublic FlightSqlClient.PreparedStatement prepare(FlightSqlClient.SubstraitPlan plan, CallOption... options) Create a prepared statement for a Substrait plan on the server.- Parameters:
- plan- The query to prepare.
- options- RPC-layer hints for this call.
- Returns:
- The representation of the prepared statement which exists on the server.
 
- 
preparepublic FlightSqlClient.PreparedStatement prepare(FlightSqlClient.SubstraitPlan plan, FlightSqlClient.Transaction transaction, CallOption... options) Create a prepared statement for a Substrait plan on the server.- Parameters:
- plan- The query to prepare.
- transaction- The transaction that this query is part of.
- options- RPC-layer hints for this call.
- Returns:
- The representation of the prepared statement which exists on the server.
 
- 
beginTransactionBegin a transaction.
- 
beginSavepointpublic FlightSqlClient.Savepoint beginSavepoint(FlightSqlClient.Transaction transaction, String name, CallOption... options) Create a savepoint within a transaction.
- 
commitCommit a transaction.
- 
releaseRelease a savepoint.
- 
rollbackRollback a transaction.
- 
rollbackRollback to a savepoint.
- 
cancelFlightInfopublic CancelFlightInfoResult cancelFlightInfo(CancelFlightInfoRequest request, CallOption... options) Cancel execution of a distributed query.- Parameters:
- request- The query to cancel.
- options- Call options.
- Returns:
- The server response.
 
- 
cancelQueryDeprecated.Explicitly cancel a running query.This lets a single client explicitly cancel work, no matter how many clients are involved/whether the query is distributed or not, given server support. The transaction/statement is not rolled back; it is the application's job to commit or rollback as appropriate. This only indicates the client no longer wishes to read the remainder of the query results or continue submitting data. 
- 
renewFlightEndpointpublic FlightEndpoint renewFlightEndpoint(RenewFlightEndpointRequest request, CallOption... options) Request the server to extend the lifetime of a query result set.- Parameters:
- request- The result set partition.
- options- Call options.
- Returns:
- The new endpoint with an updated expiration time.
 
- 
setSessionOptionspublic SetSessionOptionsResult setSessionOptions(SetSessionOptionsRequest request, CallOption... options) 
- 
getSessionOptionspublic GetSessionOptionsResult getSessionOptions(GetSessionOptionsRequest request, CallOption... options) 
- 
closeSession
- 
close- Specified by:
- closein interface- AutoCloseable
- Throws:
- Exception
 
 
- 
cancelFlightInfo(org.apache.arrow.flight.CancelFlightInfoRequest, org.apache.arrow.flight.CallOption...).