Interface TrinoThriftService


@ThriftService(value="trino", idlName="TrinoThriftService") public interface TrinoThriftService
Trino Thrift service definition. This thrift service needs to be implemented in order to be used with Thrift Connector.
  • Method Details

    • listSchemaNames

      @ThriftMethod("trinoListSchemaNames") List<String> listSchemaNames() throws TrinoThriftServiceException, io.airlift.drift.TException
      Returns available schema names.
      Throws:
      TrinoThriftServiceException
      io.airlift.drift.TException
    • listTables

      @ThriftMethod("trinoListTables") List<TrinoThriftSchemaTableName> listTables(@ThriftField(name="schemaNameOrNull") TrinoThriftNullableSchemaName schemaNameOrNull) throws TrinoThriftServiceException, io.airlift.drift.TException
      Returns tables for the given schema name.
      Parameters:
      schemaNameOrNull - a structure containing schema name or null
      Returns:
      a list of table names with corresponding schemas. If schema name is null then returns a list of tables for all schemas. Returns an empty list if a schema does not exist
      Throws:
      TrinoThriftServiceException
      io.airlift.drift.TException
    • getTableMetadata

      @ThriftMethod("trinoGetTableMetadata") TrinoThriftNullableTableMetadata getTableMetadata(@ThriftField(name="schemaTableName") TrinoThriftSchemaTableName schemaTableName) throws TrinoThriftServiceException, io.airlift.drift.TException
      Returns metadata for a given table.
      Parameters:
      schemaTableName - schema and table name
      Returns:
      metadata for a given table, or a null value inside if it does not exist
      Throws:
      TrinoThriftServiceException
      io.airlift.drift.TException
    • getSplits

      @ThriftMethod(value="trinoGetSplits", exception=@ThriftException(type=TrinoThriftServiceException.class,id=1)) com.google.common.util.concurrent.ListenableFuture<TrinoThriftSplitBatch> getSplits(@ThriftField(name="schemaTableName") TrinoThriftSchemaTableName schemaTableName, @ThriftField(name="desiredColumns") TrinoThriftNullableColumnSet desiredColumns, @ThriftField(name="outputConstraint") TrinoThriftTupleDomain outputConstraint, @ThriftField(name="maxSplitCount") int maxSplitCount, @ThriftField(name="nextToken") TrinoThriftNullableToken nextToken)
      Returns a batch of splits.
      Parameters:
      schemaTableName - schema and table name
      desiredColumns - a superset of columns to return; empty set means "no columns", null set means "all columns"
      outputConstraint - constraint on the returned data
      maxSplitCount - maximum number of splits to return
      nextToken - token from a previous split batch or null if it is the first call
      Returns:
      a batch of splits
    • getIndexSplits

      @ThriftMethod(value="trinoGetIndexSplits", exception=@ThriftException(type=TrinoThriftServiceException.class,id=1)) com.google.common.util.concurrent.ListenableFuture<TrinoThriftSplitBatch> getIndexSplits(@ThriftField(name="schemaTableName") TrinoThriftSchemaTableName schemaTableName, @ThriftField(name="indexColumnNames") List<String> indexColumnNames, @ThriftField(name="outputColumnNames") List<String> outputColumnNames, @ThriftField(name="keys") TrinoThriftPageResult keys, @ThriftField(name="outputConstraint") TrinoThriftTupleDomain outputConstraint, @ThriftField(name="maxSplitCount") int maxSplitCount, @ThriftField(name="nextToken") TrinoThriftNullableToken nextToken)
      Returns a batch of index splits for the given batch of keys. This method is called if index join strategy is chosen for a query.
      Parameters:
      schemaTableName - schema and table name
      indexColumnNames - specifies columns and their order for keys
      outputColumnNames - a list of column names to return
      keys - keys for which records need to be returned; includes only unique and non-null values
      outputConstraint - constraint on the returned data
      maxSplitCount - maximum number of splits to return
      nextToken - token from a previous split batch or null if it is the first call
      Returns:
      a batch of splits
    • getRows

      @ThriftMethod(value="trinoGetRows", exception=@ThriftException(type=TrinoThriftServiceException.class,id=1)) com.google.common.util.concurrent.ListenableFuture<TrinoThriftPageResult> getRows(@ThriftField(name="splitId") TrinoThriftId splitId, @ThriftField(name="columns") List<String> columns, @ThriftField(name="maxBytes") long maxBytes, @ThriftField(name="nextToken") TrinoThriftNullableToken nextToken)
      Returns a batch of rows for the given split.
      Parameters:
      splitId - split id as returned in split batch
      columns - a list of column names to return
      maxBytes - maximum size of returned data in bytes
      nextToken - token from a previous batch or null if it is the first call
      Returns:
      a batch of table data