[jira] [Created] (FLINK-20187) FactoryUtil#createTableSource will be confused by a table source and a table sink factory with same identifier

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[jira] [Created] (FLINK-20187) FactoryUtil#createTableSource will be confused by a table source and a table sink factory with same identifier

Shang Yuanchun (Jira)
Caizhi Weng created FLINK-20187:
-----------------------------------

             Summary: FactoryUtil#createTableSource will be confused by a table source and a table sink factory with same identifier
                 Key: FLINK-20187
                 URL: https://issues.apache.org/jira/browse/FLINK-20187
             Project: Flink
          Issue Type: Bug
          Components: Table SQL / API
    Affects Versions: 1.12.0
            Reporter: Caizhi Weng
             Fix For: 1.12.0


When creating a table source I'm faced with the following exception:

```
Caused by: org.apache.flink.table.api.ValidationException: Multiple factories for identifier 'odps' that implement 'org.apache.flink.table.factories.DynamicTableFactory' found in the classpath.

Ambiguous factory classes are:
```

However there is only one table source factory with this identifier, and another table sink factory with this identifier. {{FactoryUtil#createTableSource}} shouldn't be confused.

This is caused by {{FactoryUtil.java}} line 370, where {{factory = discoverFactory(context.getClassLoader(), DynamicTableFactory.class, connectorOption);}} should be {{factory = discoverFactory(context.getClassLoader(), factoryClass, connectorOption);}}.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)