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

Commit 58d0cc1

Browse files
jakozaurnablaone
andauthored
Remove dotted compensation (#980)
Less sure, @nablaone should look. Produce tons of warnings, does not do anything. Dead code. Co-authored-by: Rafał Strzaliński <[email protected]>
1 parent 4a9817e commit 58d0cc1

File tree

1 file changed

+0
-31
lines changed

1 file changed

+0
-31
lines changed

quesma/quesma/schema_transformer.go

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import (
1010
"quesma/model/typical_queries"
1111
"quesma/quesma/config"
1212
"quesma/schema"
13-
"quesma/util"
1413
"sort"
1514
"strings"
1615
)
@@ -630,35 +629,6 @@ func (s *SchemaCheckPass) applyTimestampField(indexSchema schema.Schema, query *
630629

631630
}
632631

633-
func (s *SchemaCheckPass) handleDottedTColumnNames(indexSchema schema.Schema, query *model.Query) (*model.Query, error) {
634-
635-
// TODO this is a workaround for now,
636-
// if we set true dashboards are working but not tests
637-
doCompensation := false
638-
639-
visitor := model.NewBaseVisitor()
640-
641-
visitor.OverrideVisitColumnRef = func(b *model.BaseExprVisitor, e model.ColumnRef) interface{} {
642-
643-
if strings.Contains(e.ColumnName, ".") {
644-
logger.Warn().Msgf("Dotted column name found: %s", e.ColumnName)
645-
646-
if doCompensation {
647-
return model.NewColumnRef(util.FieldToColumnEncoder(e.ColumnName))
648-
}
649-
650-
}
651-
return e
652-
}
653-
654-
expr := query.SelectCommand.Accept(visitor)
655-
656-
if _, ok := expr.(*model.SelectCommand); ok {
657-
query.SelectCommand = *expr.(*model.SelectCommand)
658-
}
659-
return query, nil
660-
}
661-
662632
func (s *SchemaCheckPass) applyFieldEncoding(indexSchema schema.Schema, query *model.Query) (*model.Query, error) {
663633

664634
visitor := model.NewBaseVisitor()
@@ -784,7 +754,6 @@ func (s *SchemaCheckPass) Transform(queries []*model.Query) ([]*model.Query, err
784754

785755
// Section 4: compensations and checks
786756
{TransformationName: "BooleanLiteralTransformation", Transformation: s.applyBooleanLiteralLowering},
787-
{TransformationName: "DottedColumnNames", Transformation: s.handleDottedTColumnNames},
788757
}
789758

790759
for k, query := range queries {

0 commit comments

Comments
 (0)