MCPcopy Create free account
hub / github.com/brimdata/super / isOrdinal

Function isOrdinal

compiler/semantic/sql.go:688–697  ·  view source on GitHub ↗
(e ast.Expr)

Source from the content-addressed store, hash-verified

686}
687
688func isOrdinal(e ast.Expr) (int, bool) {
689 if e, ok := e.(*ast.Primitive); ok && e.Type == "int64" {
690 colno, err := strconv.Atoi(e.Text)
691 if err != nil {
692 panic(err)
693 }
694 return colno, true
695 }
696 return -1, false
697}
698
699func (t *translator) resolveOrdinalOuter(ts tableScope, n ast.Node, prefix string, col int) sem.Expr {
700 switch ts := ts.(type) {

Callers 2

groupByMethod · 0.85
sortExprMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected