for (SqlNode selectItem : selectScope.getExpandedSelectList()) { ++ordinal; if (converted.equalsDeep(stripAs(selectItem), false)) {
/** * Returns the expressions that are in the GROUP BY clause (or the SELECT * DISTINCT clause, if distinct) and that can therefore be referenced * without being wrapped in aggregate functions. * * <p>The expressions are fully-qualified, and any "*" in select clauses are * expanded. * * @return list of grouping expressions */ private List<SqlNode> getGroupExprs() { if (distinct) { // Cannot compute this in the constructor: select list has not been // expanded yet. assert select.isDistinct(); // Remove the AS operator so the expressions are consistent with // OrderExpressionExpander. List<SqlNode> groupExprs = new ArrayList<SqlNode>(); for (SqlNode selectItem : ((SelectScope) parent).getExpandedSelectList()) { groupExprs.add(stripAs(selectItem)); } return groupExprs; } else if (select.getGroup() != null) { return groupExprList; } else { return Collections.emptyList(); } }
public SqlMonotonicity getMonotonicity(String columnName) { final RelDataType rowType = this.getRowTypeSansSystemColumns(); final int field = SqlTypeUtil.findField(rowType, columnName); final SqlNode selectItem = validator.getRawSelectScope(select) .getExpandedSelectList().get(field); return validator.getSelectScope(select).getMonotonicity(selectItem); } }
public SqlMonotonicity getMonotonicity(String columnName) { final RelDataType rowType = this.getRowTypeSansSystemColumns(); final int field = SqlTypeUtil.findField(rowType, columnName); final SqlNode selectItem = validator.getRawSelectScope(select) .getExpandedSelectList().get(field); return validator.getSelectScope(select).getMonotonicity(selectItem); } }
for ( SqlNode selectItem : ((SelectScope) parent).getExpandedSelectList())
SqlSelect sqlSelect = (SqlSelect) sqlQuery; final SelectScope scope = getRawSelectScope(sqlSelect); final List<SqlNode> selectList = scope.getExpandedSelectList(); final SqlNode selectItem = stripAs(selectList.get(i)); if (selectItem instanceof SqlIdentifier) {
private SqlNode getAgg(SqlSelect select) { final SelectScope selectScope = getRawSelectScope(select); if (selectScope != null) { final List<SqlNode> selectList = selectScope.getExpandedSelectList(); if (selectList != null) { return aggFinder.findAgg(selectList); } } return aggFinder.findAgg(select.getSelectList()); }
SqlSelect sqlSelect = (SqlSelect) sqlQuery; final SelectScope scope = getRawSelectScope(sqlSelect); final List<SqlNode> selectList = scope.getExpandedSelectList(); SqlNode selectItem = selectList.get(i); if (SqlUtil.isCallTo(selectItem, SqlStdOperatorTable.asOperator)) {
SelectScope selectScope = validator.getRawSelectScope(select); int ordinal = -1; for (SqlNode selectItem : selectScope.getExpandedSelectList()) { ++ordinal; if (selectItem.getKind() == SqlKind.AS) {
for (SqlNode selectItem : selectScope.getExpandedSelectList()) { ++ordinal; if (converted.equalsDeep(stripAs(selectItem), false)) {