-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
267 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package com.qwshen.flight; | ||
|
||
import java.io.Serializable; | ||
|
||
/** | ||
* Describes the data structure for pushed-down aggregation | ||
*/ | ||
public class PushAggregation implements Serializable { | ||
//pushed-down Aggregate-Columns (expressions) | ||
private String[] _columnExpressions = null; | ||
//pushed-down GroupBy-Columns | ||
private String[] _groupByColumns = null; | ||
|
||
/** | ||
* Push down aggregation of columns | ||
* select max(age), sum(distinct amount) from table where ... | ||
* @param columnExpressions - the collection of aggregation expressions | ||
*/ | ||
public PushAggregation(String[] columnExpressions) { | ||
this._columnExpressions = columnExpressions; | ||
} | ||
|
||
/** | ||
* Push down aggregation with group by columns | ||
* select max(age), sum(amount) from table where ... group by gender | ||
* @param columnExpressions - the collection of aggregation expressions | ||
* @param groupByColumns - the columns in group by | ||
*/ | ||
public PushAggregation(String[] columnExpressions, String[] groupByColumns) { | ||
this(columnExpressions); | ||
this._groupByColumns = groupByColumns; | ||
} | ||
|
||
/** | ||
* Return the collection of aggregation expressions | ||
* @return - the expressions | ||
*/ | ||
public String[] getColumnExpressions() { | ||
return this._columnExpressions; | ||
} | ||
|
||
/** | ||
* The columns for group-by | ||
* @return - columns | ||
*/ | ||
public String[] getGroupByColumns() { | ||
return this._groupByColumns; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.