You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "chunfeng pei (Jira)" <ji...@apache.org> on 2021/01/08 18:57:00 UTC

[jira] [Created] (CALCITE-4457) Remove dependency on CalciteConnectionConfig from SqlValidatorCatalogReader and Table core API

chunfeng pei created CALCITE-4457:
-------------------------------------

             Summary: Remove dependency on CalciteConnectionConfig from SqlValidatorCatalogReader and Table core API
                 Key: CALCITE-4457
                 URL: https://issues.apache.org/jira/browse/CALCITE-4457
             Project: Calcite
          Issue Type: Improvement
          Components: core, druid-adapter
            Reporter: chunfeng pei


SqlValidatorCatalogReader#getConfig() returns a CalciteConnectionConfig which represents a set of settings when using a calcite connection. This is an object specific to calcite connector, not to the core API. The reason this method is needed is so that validator can pass it to Table#rolledUpColumnValidInsideAgg(String, SqlCall, SqlNode, CalciteConnectionConfig) but the only instance actually using it is DruidTable.

open this ticket to refactor the code so that SchemaFactory can accept the config, and inject the config into DruidSchema, it can then be injected into DruidTable . Then refactor Table to remove the extra argument (Table is part of the base API, so it should not depend either on CalciteConnectionConfig) 

In this way, we will restrict the dependency to only DruidSchema and DruidTable, not the core Catalogreader/Table API.



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