@@ -12,6 +12,7 @@ import (
1212 "github.com/QuesmaOrg/quesma/platform/common_table"
1313 "github.com/QuesmaOrg/quesma/platform/config"
1414 "github.com/QuesmaOrg/quesma/platform/connectors"
15+ "github.com/QuesmaOrg/quesma/platform/database_common"
1516 "github.com/QuesmaOrg/quesma/platform/elasticsearch"
1617 "github.com/QuesmaOrg/quesma/platform/elasticsearch/feature"
1718 "github.com/QuesmaOrg/quesma/platform/ingest"
@@ -86,13 +87,15 @@ func main() {
8687 }()
8788
8889 var connectionPool = clickhouse .InitDBConnectionPool (& cfg )
90+ //var connectionPool = doris.InitDBConnectionPool(&cfg)
8991
9092 phoneHomeAgent := telemetry .NewPhoneHomeAgent (& cfg , connectionPool , licenseMod .License .ClientID )
9193 phoneHomeAgent .Start ()
9294
9395 virtualTableStorage := persistence .NewElasticJSONDatabase (cfg .Elasticsearch , common_table .VirtualTableElasticIndexName )
94- tableDisco := clickhouse .NewTableDiscovery (& cfg , connectionPool , virtualTableStorage )
95- schemaRegistry := schema .NewSchemaRegistry (clickhouse.TableDiscoveryTableProviderAdapter {TableDiscovery : tableDisco }, & cfg , clickhouse .NewSchemaTypeAdapter (cfg .DefaultStringColumnType ))
96+ tableDisco := database_common .NewTableDiscovery (& cfg , connectionPool , virtualTableStorage )
97+ schemaRegistry := schema .NewSchemaRegistry (database_common.TableDiscoveryTableProviderAdapter {TableDiscovery : tableDisco }, & cfg , clickhouse .NewClickhouseSchemaTypeAdapter (cfg .DefaultStringColumnType ))
98+ //schemaRegistry := schema.NewSchemaRegistry(database_common.TableDiscoveryTableProviderAdapter{TableDiscovery: tableDisco}, &cfg, doris.NewDorisSchemaTypeAdapter(cfg.DefaultStringColumnType))
9699 schemaRegistry .Start ()
97100
98101 im := elasticsearch .NewIndexManagement (cfg .Elasticsearch )
@@ -147,7 +150,7 @@ func main() {
147150
148151}
149152
150- func constructQuesma (cfg * config.QuesmaConfiguration , sl clickhouse .TableDiscovery , lm * clickhouse .LogManager , ip * ingest.IngestProcessor , schemaRegistry schema.Registry , phoneHomeAgent telemetry.PhoneHomeAgent , quesmaManagementConsole * ui.QuesmaManagementConsole , logChan <- chan logger.LogWithLevel , abResultsrepository ab_testing.Sender , indexRegistry table_resolver.TableResolver ) * Quesma {
153+ func constructQuesma (cfg * config.QuesmaConfiguration , sl database_common .TableDiscovery , lm * database_common .LogManager , ip * ingest.IngestProcessor , schemaRegistry schema.Registry , phoneHomeAgent telemetry.PhoneHomeAgent , quesmaManagementConsole * ui.QuesmaManagementConsole , logChan <- chan logger.LogWithLevel , abResultsrepository ab_testing.Sender , indexRegistry table_resolver.TableResolver ) * Quesma {
151154 if cfg .TransparentProxy {
152155 return NewQuesmaTcpProxy (cfg , quesmaManagementConsole , logChan , false )
153156 } else {
0 commit comments