MCPcopy Index your code
hub / github.com/uber/aresdb / mergeWithOrSubQueries

Method mergeWithOrSubQueries

query/sql/sql_parser.go:1543–1562  ·  view source on GitHub ↗

mergeWithOrSubQueries merge all subquery/withQuery's information into v.aql

()

Source from the content-addressed store, hash-verified

1541
1542// mergeWithOrSubQueries merge all subquery/withQuery's information into v.aql
1543func (v *ASTBuilder) mergeWithOrSubQueries() {
1544 for i, join := range v.SQL2AqlCtx.MapJoinTables[0] {
1545 withOrSubQKey, _ := v.SQL2AqlCtx.queryIdentifierSet[join.Alias]
1546 if i == 0 {
1547 v.mergeWithOrSubQuery(withOrSubQKey, false)
1548 } else {
1549 v.mergeWithOrSubQuery(withOrSubQKey, true)
1550 }
1551 }
1552
1553 v.aql.Measures = v.SQL2AqlCtx.MapMeasures[0]
1554 v.aql.Dimensions = v.SQL2AqlCtx.MapDimensions[0]
1555 if len(v.SQL2AqlCtx.MapOrderBy[0]) != 0 {
1556 v.aql.Sorts = v.SQL2AqlCtx.MapOrderBy[0]
1557 }
1558 v.aql.Filters = v.SQL2AqlCtx.MapRowFilters[0]
1559 v.aql.TimeFilter = v.SQL2AqlCtx.timeFilter
1560 v.aql.Timezone = v.SQL2AqlCtx.timezone
1561 v.aql.Limit = v.SQL2AqlCtx.MapLimit[0]
1562}
1563
1564// mergeWithOrSubQuery merge one subquery/withQuery information into v.aql
1565func (v *ASTBuilder) mergeWithOrSubQuery(key int, ignoreJoin bool) {

Callers 1

GetAQLMethod · 0.95

Calls 1

mergeWithOrSubQueryMethod · 0.95

Tested by

no test coverage detected