public static Map<String, Set<String>> parseTableExpressionWithSchema(final ShardingSphereDatabase database, final Collection<SchemaTable> schemaTables) {
        Collection<String> systemSchemas = DatabaseTypedSPILoader.getService(DialectSystemDatabase.class, database.getProtocolType()).getSystemSchemas();
        if (schemaTables.stream().anyMatch(each -> "*".equals(each.getTable()) && ("*".equals(each.getSchema()) || each.getSchema().isEmpty()))) {
            return parseTableExpressionWithAllTables(database, systemSchemas);
        }
        Map<String, Set<String>> result = new HashMap<>();
        DialectDatabaseMetaData dialectDatabaseMetaData = new DatabaseTypeRegistry(database.getProtocolType()).getDialectDatabaseMetaData();
        for (SchemaTable each : schemaTables) {
            if ("*".equals(each.getSchema())) {
                result.putAll(parseTableExpressionWithAllSchema(database, systemSchemas, each));
            } else if ("*".equals(each.getTable())) {
                result.putAll(parseTableExpressionWithAllTable(database, each));
            } else {
                String schemaName = each.getSchema();
                if (dialectDatabaseMetaData.getDefaultSchema().isPresent() && schemaName.isEmpty()) {
                    schemaName = dialectDatabaseMetaData.getDefaultSchema().get();
                }
                ShardingSpherePreconditions.checkNotNull(database.getSchema(schemaName).getTable(each.getTable()), () -> new TableNotFoundException(each.getTable()));
                result.computeIfAbsent(schemaName, ignored -> new HashSet<>()).add(each.getTable());
            }
        }
        return result;
    }
@Test
    void assertParseTableExpression() {
        Map<String, ShardingSphereSchema> schemas = new HashMap<>(2, 1F);
        schemas.put("public", mockedPublicSchema());
        schemas.put("test", mockedTestSchema());
        ShardingSphereDatabase database = new ShardingSphereDatabase("sharding_db", TypedSPILoader.getService(DatabaseType.class, "openGauss"), null, null, schemas);
        List<SchemaTable> schemaTables = Arrays.asList(SchemaTable.newBuilder().setSchema("public").setTable("t_order").build(),
                SchemaTable.newBuilder().setSchema("test").setTable("*").build());
        Map<String, Set<String>> expected = new HashMap<>(2, 1F);
        expected.put("test", new HashSet<>(Arrays.asList("t_order_item", "t_order_item2")));
        expected.put("public", Collections.singleton("t_order"));
        Map<String, Set<String>> actual = CDCSchemaTableUtils.parseTableExpressionWithSchema(database, schemaTables);
        assertThat(actual, is(expected));
        schemaTables = Collections.singletonList(SchemaTable.newBuilder().setTable("t_order").build());
        actual = CDCSchemaTableUtils.parseTableExpressionWithSchema(database, schemaTables);
        expected = Collections.singletonMap("public", Collections.singleton("t_order"));
        assertThat(actual, is(expected));
        schemaTables = Collections.singletonList(SchemaTable.newBuilder().setSchema("*").setTable("t_order").build());
        actual = CDCSchemaTableUtils.parseTableExpressionWithSchema(database, schemaTables);
        expected = Collections.singletonMap("public", Collections.singleton("t_order"));
        assertThat(actual, is(expected));
    }