Skip to content
This repository was archived by the owner on Nov 7, 2025. It is now read-only.

Commit 2221450

Browse files
committed
Minor fixes
1 parent 96b12f8 commit 2221450

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

platform/frontend_connectors/schema_transformer.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ func NewSchemaCheckPass(cfg *config.QuesmaConfiguration, tableDiscovery database
3838
tableDiscovery: tableDiscovery,
3939
searchAfterStrategy: searchAfterStrategyFactory(strategyType),
4040
}
41-
schemaCheckPass.transformations = schemaCheckPass.makeTransformations(quesma_api.ClickHouseSQLBackend)
4241
return schemaCheckPass
4342
}
4443

@@ -1202,14 +1201,19 @@ func (s *SchemaCheckPass) makeTransformations(backendConnectorType quesma_api.Ba
12021201

12031202
func (s *SchemaCheckPass) Transform(plan *model.ExecutionPlan) (*model.ExecutionPlan, error) {
12041203

1204+
backendConnectorType := quesma_api.ClickHouseSQLBackend
1205+
if plan != nil && plan.BackendConnector != nil {
1206+
backendConnectorType = plan.BackendConnector.GetId()
1207+
}
1208+
transformationChain := s.makeTransformations(backendConnectorType)
12051209
for k, query := range plan.Queries {
12061210
var err error
12071211

12081212
if !s.cfg.Logging.EnableSQLTracing {
12091213
query.TransformationHistory.SchemaTransformers = append(query.TransformationHistory.SchemaTransformers, "n/a")
12101214
}
12111215

1212-
for _, transformation := range s.transformations {
1216+
for _, transformation := range transformationChain {
12131217

12141218
var inputQuery string
12151219

platform/v2/core/backend_connectors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import "context"
77
type BackendConnectorType int
88

99
const (
10-
NoopBackend = iota
10+
NoopBackend BackendConnectorType = iota
1111
MySQLBackend
1212
PgSQLBackend
1313
ClickHouseSQLBackend

0 commit comments

Comments
 (0)