@Override
    public TTableDescriptor toThrift(List<DescriptorTable.ReferencedPartitionInfo> partitions) {
        return new TTableDescriptor(id, TTableType.KUDU_TABLE,
                fullSchema.size(), 0, tableName, databaseName);
    }
@Test
    public void testToThrift() {
        List<ColumnSchema> columns = Arrays.asList(
                genColumnSchema("a", org.apache.kudu.Type.INT32),
                genColumnSchema("b", org.apache.kudu.Type.STRING),
                genColumnSchema("c", org.apache.kudu.Type.DATE)
        );
        List<Column> fullSchema = new ArrayList<>(columns.size());
        for (ColumnSchema column : columns) {
            Type fieldType = ColumnTypeConverter.fromKuduType(column);
            Column convertedColumn = new Column(column.getName(), fieldType, true);
            fullSchema.add(convertedColumn);
        }
        String catalogName = "testCatalog";
        String dbName = "testDB";
        String tableName = "testTable";
        KuduTable kuduTable = new KuduTable("localhost:7051", catalogName, dbName, tableName,
                null, fullSchema, new ArrayList<>());

        TTableDescriptor tTableDescriptor = kuduTable.toThrift(null);
        Assert.assertEquals(tTableDescriptor.getDbName(), dbName);
        Assert.assertEquals(tTableDescriptor.getTableName(), tableName);
        Assert.assertEquals(tTableDescriptor.getNumCols(), 3);
        Assert.assertEquals(tTableDescriptor.getTableType(), TTableType.KUDU_TABLE);
    }