minor, remove method fillbackOptimizedColumn
Project: http://git-wip-us.apache.org/repos/asf/kylin/repo Commit: http://git-wip-us.apache.org/repos/asf/kylin/commit/6b4f70d2 Tree: http://git-wip-us.apache.org/repos/asf/kylin/tree/6b4f70d2 Diff: http://git-wip-us.apache.org/repos/asf/kylin/diff/6b4f70d2 Branch: refs/heads/master-hbase0.98 Commit: 6b4f70d257e1eb363a7b792cde8f6f59821094a6 Parents: 75630b8 Author: Roger Shi <rogershijich...@hotmail.com> Authored: Sun Apr 9 21:26:09 2017 +0800 Committer: Roger Shi <rogershijich...@hotmail.com> Committed: Sun Apr 9 21:26:09 2017 +0800 ---------------------------------------------------------------------- .../kylin/query/relnode/OLAPAggregateRel.java | 18 ------------------ 1 file changed, 18 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/kylin/blob/6b4f70d2/query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java ---------------------------------------------------------------------- diff --git a/query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java b/query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java index 2c75a14..1378681 100644 --- a/query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java +++ b/query/src/main/java/org/apache/kylin/query/relnode/OLAPAggregateRel.java @@ -345,8 +345,6 @@ public class OLAPAggregateRel extends Aggregate implements OLAPRel { } private void buildRewriteFieldsAndMetricsColumns() { - fillbackOptimizedColumn(); - ColumnRowType inputColumnRowType = ((OLAPRel) getInput()).getColumnRowType(); RelDataTypeFactory typeFactory = getCluster().getTypeFactory(); for (int i = 0; i < this.aggregations.size(); i++) { @@ -385,22 +383,6 @@ public class OLAPAggregateRel extends Aggregate implements OLAPRel { } } - private void fillbackOptimizedColumn() { - // some aggcall will be optimized out in sub-query (e.g. tableau generated sql), we need to fill them back - RelDataType inputAggRow = getInput().getRowType(); - RelDataType outputAggRow = getRowType(); - if (inputAggRow.getFieldCount() != outputAggRow.getFieldCount()) { - for (RelDataTypeField inputField : inputAggRow.getFieldList()) { - String inputFieldName = inputField.getName(); - // constant columns(starts with $) should not be added to context. - if (!inputFieldName.startsWith("$") && outputAggRow.getField(inputFieldName, true, false) == null) { - TblColRef column = this.columnRowType.getColumnByIndex(inputField.getIndex()); - this.context.metricsColumns.add(column); - } - } - } - } - private boolean noPrecaculatedFieldsAvailable() { return !this.context.hasPrecalculatedFields() || !RewriteImplementor.needRewrite(this.context); }