use of com.amazonaws.athena.connector.lambda.data.BlockSpiller in project aws-athena-query-federation by awslabs.
the class HiveMuxRecordHandlerTest method readWithConstraint.
@Test
public void readWithConstraint() throws SQLException {
BlockSpiller blockSpiller = Mockito.mock(BlockSpiller.class);
ReadRecordsRequest readRecordsRequest = Mockito.mock(ReadRecordsRequest.class);
Mockito.when(readRecordsRequest.getCatalogName()).thenReturn("recordHive");
this.jdbcRecordHandler.readWithConstraint(blockSpiller, readRecordsRequest, queryStatusChecker);
Mockito.verify(this.hiveRecordHandler, Mockito.times(1)).readWithConstraint(Mockito.eq(blockSpiller), Mockito.eq(readRecordsRequest), Mockito.eq(queryStatusChecker));
}
use of com.amazonaws.athena.connector.lambda.data.BlockSpiller in project aws-athena-query-federation by awslabs.
the class DataLakeGen2MuxRecordHandlerTest method readWithConstraintWithUnsupportedCatalog.
@Test(expected = RuntimeException.class)
public void readWithConstraintWithUnsupportedCatalog() {
BlockSpiller blockSpiller = Mockito.mock(BlockSpiller.class);
ReadRecordsRequest readRecordsRequest = Mockito.mock(ReadRecordsRequest.class);
Mockito.when(readRecordsRequest.getCatalogName()).thenReturn("unsupportedCatalog");
this.jdbcRecordHandler.readWithConstraint(blockSpiller, readRecordsRequest, queryStatusChecker);
}
Aggregations