core/src/main/java/org/apache/hop/core/sql/SqlCondition.java
public List<SqlField> extractHavingFields(
      List<SqlField> selectFields, List<SqlField> aggFields, IRowMeta rowMeta) throws HopException {
    List<SqlField> list = new ArrayList<>();

    // Get a list of all the lowest level field names and see if we can parse them as aggregation
    // fields
    //
    List<String> expressions = new ArrayList<>();
    addExpressions(condition, expressions);

    for (String expression : expressions) {
      // See if we already specified the aggregation in the Select clause, let's aggregate twice.
      //
      SqlField aggField = SqlField.searchSQLFieldByFieldOrAlias(aggFields, expression);
      if (aggField == null) {

        SqlField field = new SqlField(tableAlias, expression, serviceFields);
        if (field.getAggregation() != null) {
          field.setField(expression);
          list.add(field);
        }
      }
    }

    return list;
  }
/**
   * Extract the list of having fields from this having condition
   *
   * @param aggFields
   * @param rowMeta
   * @return
   * @throws HopSqlException
   */
Extract the list of having fields from this having condition
@param aggFields
@param rowMeta
@return
@throws HopSqlException
Extract the list of having fields from this having condition @param aggFields @param rowMeta @return @throws HopSqlException
public List<SqlField> extractHavingFields(
      List<SqlField> selectFields, List<SqlField> aggFields, IRowMeta rowMeta) throws HopException {
    List<SqlField> list = new ArrayList<>();
    List<String> expressions = new ArrayList<>();
    addExpressions(condition, expressions);
    for (String expression : expressions) {
       See if we already specified the aggregation in the Select clause, let's aggregate twice.
      SqlField aggField = SqlField.searchSQLFieldByFieldOrAlias(aggFields, expression);
      if (aggField == null) {
        SqlField field = new SqlField(tableAlias, expression, serviceFields);
        if (field.getAggregation() != null) {
          field.setField(expression);
          list.add(field);
        }
      }
    }
    return list;
  }
public List < SqlField > extractHavingFields ( List < SqlField > selectFields , List < SqlField > aggFields , IRowMeta rowMeta ) throws HopException { List < SqlField > list = new ArrayList < > ( ) ; List < String > expressions = new ArrayList < > ( ) ; addExpressions ( condition , expressions ) ; for ( String expression : expressions ) { SqlField aggField = SqlField . searchSQLFieldByFieldOrAlias ( aggFields , expression ) ; if ( aggField == null ) { SqlField field = new SqlField ( tableAlias , expression , serviceFields ) ; if ( field . getAggregation ( ) != null ) { field . setField ( expression ) ; list . add ( field ) ; } } } return list ; }
Extract the list of having fields from this having condition
 @param aggFields
 @param rowMeta
 @return
 @throws HopSqlException
Extract the list of having fields from this having condition @param aggFields @param rowMeta @return @throws HopSqlException
// Get a list of all the lowest level field names and see if we can parse them as aggregation // fields // // See if we already specified the aggregation in the Select clause, let's aggregate twice. //