@@ -5,12 +5,10 @@ package main
55
66import (
77 "context"
8+ "github.com/QuesmaOrg/quesma/platform/database_common"
89 "github.com/QuesmaOrg/quesma/platform/model"
910 "github.com/QuesmaOrg/quesma/platform/parsers/elastic_query_dsl"
1011
11- // TODO elastic query parser needs a clickhouse package
12- // due to the table dependency
13- "github.com/QuesmaOrg/quesma/platform/clickhouse"
1412 "github.com/QuesmaOrg/quesma/platform/frontend_connectors"
1513 "github.com/QuesmaOrg/quesma/platform/logger"
1614 "github.com/QuesmaOrg/quesma/platform/processors"
@@ -388,15 +386,15 @@ func (p *QueryTransformationPipeline) ParseQuery(message any) (*model.ExecutionP
388386 // TODO this is a hack to create a table for the query
389387 // Why parser needs a table?
390388 tableName := "test_table"
391- table := clickhouse .Table {
389+ table := database_common .Table {
392390 Name : tableName ,
393391 DatabaseName : "default" ,
394- Cols : map [string ]* clickhouse .Column {
395- "message" : {Name : "message" , Type : clickhouse .NewBaseType ("String" )},
396- "@timestamp" : {Name : "@timestamp" , Type : clickhouse .NewBaseType ("DateTime64" )},
397- "attributes_values" : {Name : "attributes_values" , Type : clickhouse .NewBaseType ("Map(String,String)" )},
392+ Cols : map [string ]* database_common .Column {
393+ "message" : {Name : "message" , Type : database_common .NewBaseType ("String" )},
394+ "@timestamp" : {Name : "@timestamp" , Type : database_common .NewBaseType ("DateTime64" )},
395+ "attributes_values" : {Name : "attributes_values" , Type : database_common .NewBaseType ("Map(String,String)" )},
398396 },
399- Config : clickhouse .NewNoTimestampOnlyStringAttrCHConfig (),
397+ Config : database_common .NewNoTimestampOnlyStringAttrCHConfig (),
400398 }
401399 cw := elastic_query_dsl.ClickhouseQueryTranslator {
402400 Ctx : req .OriginalRequest .Context (),
0 commit comments