Compatible Port Types
You can connect two operators only if the output port of the first operator and the input port of the second operator are compatible.
The engine performs compatibility checks only when you run the graph and when the graph is loaded. If the port types are not compatible, the graph fails with a corresponding message in the trace.
Compatibility is checked in two steps as follows:
- For the base types one of the following rules is satisfied:
- the base types of the operators are identical or
- one of them is of type any and the other is one of the compatible types listed in the preceding table.
- The semantic type of one port type is a specialization of the semantic type of another port type. The semantic type, including the empty one, is a specialization of *.
|
Output Port Types |
Input Port Types |
Compatible | Reason |
|---|---|---|---|
|
any |
any |
yes | Identical base type. No semantic type |
|
any |
any.* |
yes | Identical base type. Here, * can be substituted by the empty semantic type. So, any is a specialization of any.* |
|
any |
string |
yes | Compatible base types and no semantic type |
| stream | any | no | Incompatible base types |
| float64.* | int64.* | no | Incompatible base types |
|
any.* |
string.* |
yes | Compatible base types and identical semantic type |
|
any.* |
string.com.sap |
yes | Compatible base types. com.sap is a specialization of * |
|
any.* |
string.com.sap.* |
yes | Compatible base types. com.sap.* is a specialization of * |
|
any.com.sap |
any.com.sap |
yes | Identical base and semantic types |
|
string.com.* |
string.com.sap.* |
yes | Identical base type. com.* is a specialization of com.sap.* |
| any | any.com | no | Identical base type. But com is not a specialization of the empty semantic type. Both sides are specializations of .* though. |
| any | any.com.* | no | Identical base type. But, com.* is not a specialization of the empty semantic type |
