[
https://issues.apache.org/jira/browse/CALCITE-2435?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16566498#comment-16566498
]
Vladimir Sitnikov commented on CALCITE-2435:
--------------------------------------------
{quote} I am worried that losing the cache will have a significant
impact.\{quote}
Note: the cache was associating the values with IDENTICAL SqlTestFactory
instances. The key of the cache was SqlTestFactory object, and no
implementation had hashCode/equals implemented.
Now I just store the values in the fields of SqlTestFactory, so the caching
behavior is the same as it was before. There's no "losing the cache".
> Refactor SqlTestFactory
> -----------------------
>
> Key: CALCITE-2435
> URL: https://issues.apache.org/jira/browse/CALCITE-2435
> Project: Calcite
> Issue Type: Bug
> Components: core
> Affects Versions: 1.17.0
> Reporter: Vladimir Sitnikov
> Assignee: Julian Hyde
> Priority: Major
>
> Current SqlTestFactory/DelegatingSqlTestFactory is hard to reason about, and
> it is hard to extend/cache properly.
> There are three key changes here:
> 1. Rename DefaultSqlTestFactory to SqlTestFactory. SqlTestFactory was an
> interface, however it has a single viable implementation, so it makes little
> sense to keep it as is.
> 2. Move MockCatalogReader.init and MockCatalogReader.init2 to
> MockCatalogReaderSimple and MockCatalogReaderExtended
> 3. Move MockCatalogReader to its own package, and split several inner classes
> to a top-level ones.
> 4. Replace usages
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)