Package com.ocient.util

# Class MockOcientCluster.IdempotentResultSetProvider

java.lang.Object
com.ocient.util.MockOcientCluster.IdempotentResultSetProvider

Enclosing class:
  `MockOcientCluster`

public abstract static class MockOcientCluster.IdempotentResultSetProvider extends Object
Provides a mechanism for simulating result set production with minimal overhead. Implementations are responsible for ensuring idempotency of the result set retrieval, typically by caching or pre-calculating the results to ensure users can deterministically map a sequenced buffer to a range of rows.

## Constructor Summary

Constructors
Constructor
Description
`IdempotentResultSetProvider()`

## Method Summary

Modifier and Type
Method
Description
`abstract ClientWireProtocol.ExecuteQueryResponse`
`getExecuteQueryResponse(UUID queryId, ClientWireProtocol.ExecuteQuery req)`
Returns the query optimization result and stream parameters.
`abstract String`
`getIdentifier()`
Returns an identifier for this result set provider.
`abstract ClientWireProtocol.FetchMetadataResponse`
`getMetadataResponse()`
Returns the metadata for this result set.
`abstract com.google.protobuf.ByteString`
`getResultSetBuffer(long sequenceNumber)`
Returns the `ByteString` representing the serialized rows in row-major format.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### IdempotentResultSetProvider

public IdempotentResultSetProvider()

## Method Details

### getIdentifier

public abstract String getIdentifier()
Returns an identifier for this result set provider. The identifier should represent the SQL query and any specific conditions or parameters that would affect the result set.

### getExecuteQueryResponse

public abstract ClientWireProtocol.ExecuteQueryResponse getExecuteQueryResponse(UUID queryId, ClientWireProtocol.ExecuteQuery req)
Returns the query optimization result and stream parameters.

### getMetadataResponse

public abstract ClientWireProtocol.FetchMetadataResponse getMetadataResponse()
Returns the metadata for this result set.

### getResultSetBuffer

public abstract com.google.protobuf.ByteString getResultSetBuffer(long sequenceNumber)
Returns the `ByteString` representing the serialized rows in row-major format. See https://ocient.atlassian.net/wiki/spaces/CON/pages/3511320603/Ocient+Wire+Protocol#Result-Set-Format