You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Andrey Mashenkov (Jira)" <ji...@apache.org> on 2023/05/02 11:02:00 UTC

[jira] [Assigned] (IGNITE-18872) Sql. Make IgniteTypeFactory a singletone.

     [ https://issues.apache.org/jira/browse/IGNITE-18872?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Andrey Mashenkov reassigned IGNITE-18872:
-----------------------------------------

    Assignee: Andrey Mashenkov

> Sql. Make IgniteTypeFactory a singletone.
> -----------------------------------------
>
>                 Key: IGNITE-18872
>                 URL: https://issues.apache.org/jira/browse/IGNITE-18872
>             Project: Ignite
>          Issue Type: Improvement
>          Components: sql
>            Reporter: Andrey Mashenkov
>            Assignee: Andrey Mashenkov
>            Priority: Major
>              Labels: ignite-3
>             Fix For: 3.0.0-beta2
>
>
> As of now we have one static instance of TypeFactory in BasicQueryContext and another one is creating in the class constructor.
> TypeFactory cache type objects and use intern (similar to String.intern()) to avoid duplicate objects.
> Type comparison, which are created with different factories, via equals is not cheap. Actually, a string digest of each object created, then strings are compared each time.
> It make no sense to have more than one TypeFactory instance. 
>  
> Also, we have few places where types are compared as ‘==’ that is incorrect.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)