@Override
    public Prepare.PreparingTable getTable(List<String> names) {
        Prepare.PreparingTable originRelOptTable = super.getTable(names);
        if (originRelOptTable == null) {
            return null;
        } else {
            // Wrap as FlinkPreparingTableBase to use in query optimization.
            CatalogSchemaTable table = originRelOptTable.unwrap(CatalogSchemaTable.class);
            if (table != null) {
                return toPreparingTable(
                        originRelOptTable.getRelOptSchema(),
                        originRelOptTable.getQualifiedName(),
                        originRelOptTable.getRowType(),
                        table);
            } else {
                return originRelOptTable;
            }
        }
    }
@Test
    void testGetFlinkPreparingTableBase() {
        // Mock CatalogSchemaTable.
        final ObjectIdentifier objectIdentifier = ObjectIdentifier.of("a", "b", "c");
        final ResolvedSchema schema =
                new ResolvedSchema(Collections.emptyList(), Collections.emptyList(), null);
        final CatalogTable catalogTable =
                ConnectorCatalogTable.source(
                        new TestTableSource(true, TableSchema.fromResolvedSchema(schema)), true);
        final ResolvedCatalogTable resolvedCatalogTable =
                new ResolvedCatalogTable(catalogTable, schema);
        CatalogSchemaTable mockTable =
                new CatalogSchemaTable(
                        ContextResolvedTable.permanent(
                                objectIdentifier,
                                CatalogManagerMocks.createEmptyCatalog(),
                                resolvedCatalogTable),
                        FlinkStatistic.UNKNOWN(),
                        true);

        rootSchemaPlus.add(tableMockName, mockTable);
        Prepare.PreparingTable preparingTable =
                catalogReader.getTable(Collections.singletonList(tableMockName));
        assertThat(preparingTable).isInstanceOf(FlinkPreparingTableBase.class);
    }