RewriteSelect We are removing Column Aliases "user_id as uid" as well as functions - used when we are going to defer projection, aggs
(m *SqlSelect)
| 11 | // RewriteSelect We are removing Column Aliases "user_id as uid" |
| 12 | // as well as functions - used when we are going to defer projection, aggs |
| 13 | func RewriteSelect(m *SqlSelect) { |
| 14 | originalCols := m.Columns |
| 15 | m.Columns = make(Columns, 0, len(originalCols)+5) |
| 16 | rewriteIntoProjection(m, originalCols) |
| 17 | rewriteIntoProjection(m, m.GroupBy) |
| 18 | if m.Where != nil { |
| 19 | colsToAdd := expr.FindAllIdentityField(m.Where.Expr) |
| 20 | addIntoProjection(m, colsToAdd) |
| 21 | } |
| 22 | rewriteIntoProjection(m, m.OrderBy) |
| 23 | } |
| 24 | |
| 25 | // RewriteSqlSource this Source to act as a stand-alone query to backend |
| 26 | // @parentStmt = the parent statement that this a partial source to |
no test coverage detected