@Override
    public Table getTable(String dbName, String tblName) {
        Identifier identifier = new Identifier(dbName, tblName);
        if (tables.containsKey(identifier)) {
            return tables.get(identifier);
        }
        org.apache.paimon.table.Table paimonNativeTable;
        try {
            paimonNativeTable = this.paimonNativeCatalog.getTable(identifier);
        } catch (Catalog.TableNotExistException e) {
            LOG.error("Paimon table {}.{} does not exist.", dbName, tblName, e);
            return null;
        }
        List<DataField> fields = paimonNativeTable.rowType().getFields();
        ArrayList<Column> fullSchema = new ArrayList<>(fields.size());
        for (DataField field : fields) {
            String fieldName = field.name();
            DataType type = field.type();
            Type fieldType = ColumnTypeConverter.fromPaimonType(type);
            Column column = new Column(fieldName, fieldType, true, field.description());
            fullSchema.add(column);
        }
        long createTime = this.getTableCreateTime(dbName, tblName);
        String comment = "";
        if (paimonNativeTable.comment().isPresent()) {
            comment = paimonNativeTable.comment().get();
        }
        PaimonTable table = new PaimonTable(this.catalogName, dbName, tblName, fullSchema, paimonNativeTable, createTime);
        table.setComment(comment);
        tables.put(identifier, table);
        return table;
    }
@Test
    public void testGetTable(@Mocked FileStoreTable paimonNativeTable) throws Catalog.TableNotExistException {
        List<DataField> fields = new ArrayList<>();
        fields.add(new DataField(1, "col2", new IntType(true)));
        fields.add(new DataField(2, "col3", new DoubleType(false)));
        new MockUp<PaimonMetadata>() {
            @Mock
            public long getTableCreateTime(String dbName, String tblName) {
                return 0L;
            }
        };
        new Expectations() {
            {
                paimonNativeCatalog.getTable((Identifier) any);
                result = paimonNativeTable;
                paimonNativeTable.rowType().getFields();
                result = fields;
                paimonNativeTable.partitionKeys();
                result = new ArrayList<>(Collections.singleton("col1"));
                paimonNativeTable.location().toString();
                result = "hdfs://127.0.0.1:10000/paimon";
            }
        };
        com.starrocks.catalog.Table table = metadata.getTable("db1", "tbl1");
        PaimonTable paimonTable = (PaimonTable) table;
        Assert.assertEquals("db1", paimonTable.getDbName());
        Assert.assertEquals("tbl1", paimonTable.getTableName());
        Assert.assertEquals(Lists.newArrayList("col1"), paimonTable.getPartitionColumnNames());
        Assert.assertEquals("hdfs://127.0.0.1:10000/paimon", paimonTable.getTableLocation());
        Assert.assertEquals(ScalarType.INT, paimonTable.getBaseSchema().get(0).getType());
        Assert.assertTrue(paimonTable.getBaseSchema().get(0).isAllowNull());
        Assert.assertEquals(ScalarType.DOUBLE, paimonTable.getBaseSchema().get(1).getType());
        Assert.assertTrue(paimonTable.getBaseSchema().get(1).isAllowNull());
        Assert.assertEquals("paimon_catalog", paimonTable.getCatalogName());
        Assert.assertEquals("paimon_catalog.db1.tbl1.0", paimonTable.getUUID());
    }