You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flink.apache.org by "Timo Walther (Jira)" <ji...@apache.org> on 2020/02/27 14:15:00 UTC

[jira] [Created] (FLINK-16314) Revisit FlinkTypeFactory

Timo Walther created FLINK-16314:
------------------------------------

             Summary: Revisit FlinkTypeFactory
                 Key: FLINK-16314
                 URL: https://issues.apache.org/jira/browse/FLINK-16314
             Project: Flink
          Issue Type: Improvement
          Components: Table SQL / Planner
            Reporter: Timo Walther
            Assignee: Timo Walther


While trying to fix FLINK-14042, FlinkTypeFactory causes a couple of problems that can not be fixed easily. Some issues:

- Inconsistent caching: FlinkTypeFactory still maintains its own seenTypes whereas the legacy planner already removed it due to inconsistent equality issues. The same problem still exists in the Blink planner regarding time attributes. Let's investigate if we can implement a TimestampType.equals including this metadata.

- Mutation of nullability: {{createTypeWithNullability}} removes NOT NULL information when copying fields

- Handling of RAW types: According to FLIP-37, raw types should work with type serializer. Currently, type information is used.

- Relation to JavaTypeFactoryImpl: There is no concrete reason why we use JavaTypeFactoryImpl as far I can see. SqlTypeFactoryImpl should do the job.

I suggest to reimplement the FlinkTypeFactory in Java and perform a code review, code simplification at the same time.



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