Shawn-Hx opened a new pull request, #3821:
URL: https://github.com/apache/flink-cdc/pull/3821
In SchemaMergingUtils#getLeastCommonType, the merge result of BIGINT and
DOUBLE is STRING now.
However, considering JSON format, JSON numbers can be integers or floating
point, which can be inferred as BIGINT and DOUBLE respectively. In this case,
a JSON number field will be inferred as STRING, which is confusing.
The updated data type merge tree is:
```mermaid
graph TD;
BOOLEAN --> STRING;
CHAR --> STRING;
VARCHAR --> STRING;
BINARY --> STRING;
VARBINARY --> STRING;
TINYINT --> FLOAT;
SMALLINT --> FLOAT;
FLOAT --> DOUBLE;
TINYINT --> SMALLINT --> INT --> BIGINT --> DECIMAL --> DOUBLE -->
STRING;
TIMESTAMP --> TIMESTAMP_LTZ --> TIMESTAMP_TZ --> STRING;
TIME --> STRING;
ROW --> STRING;
ARRAY --> STRING;
MAP --> STRING;
Specially, the merge result of DOUBLE and DECIMAL will be STRING.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]