Search in sources :

Example 6 with TableInput

use of com.amazonaws.services.glue.model.TableInput in project presto by prestodb.

the class TestGlueInputConverter method testConvertTable.

@Test
public void testConvertTable() {
    TableInput tblInput = GlueInputConverter.convertTable(testTbl);
    assertEquals(tblInput.getName(), testTbl.getTableName());
    assertEquals(tblInput.getOwner(), testTbl.getOwner());
    assertEquals(tblInput.getTableType(), testTbl.getTableType().toString());
    assertEquals(tblInput.getParameters(), testTbl.getParameters());
    assertColumnList(tblInput.getStorageDescriptor().getColumns(), testTbl.getDataColumns());
    assertColumnList(tblInput.getPartitionKeys(), testTbl.getPartitionColumns());
    assertStorage(tblInput.getStorageDescriptor(), testTbl.getStorage());
    assertEquals(tblInput.getViewExpandedText(), testTbl.getViewExpandedText().get());
    assertEquals(tblInput.getViewOriginalText(), testTbl.getViewOriginalText().get());
}
Also used : TableInput(com.amazonaws.services.glue.model.TableInput) Test(org.testng.annotations.Test)

Aggregations

TableInput (com.amazonaws.services.glue.model.TableInput)6 AmazonServiceException (com.amazonaws.AmazonServiceException)3 EntityNotFoundException (com.amazonaws.services.glue.model.EntityNotFoundException)3 GlueInputConverter.toTableInput (com.facebook.presto.hive.metastore.glue.converter.GlueInputConverter.toTableInput)3 PrestoException (com.facebook.presto.spi.PrestoException)3 SchemaTableName (com.facebook.presto.spi.SchemaTableName)3 UpdateTableRequest (com.amazonaws.services.glue.model.UpdateTableRequest)2 TableNotFoundException (com.facebook.presto.spi.TableNotFoundException)2 AlreadyExistsException (com.amazonaws.services.glue.model.AlreadyExistsException)1 CreateTableRequest (com.amazonaws.services.glue.model.CreateTableRequest)1 SchemaAlreadyExistsException (com.facebook.presto.hive.SchemaAlreadyExistsException)1 TableAlreadyExistsException (com.facebook.presto.hive.TableAlreadyExistsException)1 PartitionStatistics (com.facebook.presto.hive.metastore.PartitionStatistics)1 Table (com.facebook.presto.hive.metastore.Table)1 SchemaNotFoundException (com.facebook.presto.spi.SchemaNotFoundException)1 Test (org.testng.annotations.Test)1