Skip to content

Commit e5fa6c1

Browse files
author
James Cor
committed
simplify aliases
1 parent 427bb03 commit e5fa6c1

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

sql/analyzer/aliases.go

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -294,25 +294,6 @@ func aliasedExpressionsInNode(n sql.Node) map[string]string {
294294
return aliasesFromExpressionToName
295295
}
296296

297-
// aliasesDefinedInNode returns the expression aliases that are defined in the first Projector node found, starting
298-
// the search from the specified node. All returned alias names are normalized to lower case.
299-
func aliasesDefinedInNode(n sql.Node) []string {
300-
projector := findFirstProjectorNode(n)
301-
if projector == nil {
302-
return nil
303-
}
304-
305-
var aliases []string
306-
for _, e := range projector.ProjectedExprs() {
307-
alias, ok := e.(*expression.Alias)
308-
if ok {
309-
aliases = append(aliases, strings.ToLower(alias.Name()))
310-
}
311-
}
312-
313-
return aliases
314-
}
315-
316297
// normalizeExpressions returns the expressions given after normalizing them to replace table and expression aliases
317298
// with their underlying names. This is necessary to match such expressions against those declared by implementors of
318299
// various interfaces that declare expressions to handle, such as Index.Expressions(), FilteredTable, etc.

0 commit comments

Comments
 (0)