From d2a83407ce82a1edc613c269bdd2153e726c50b6 Mon Sep 17 00:00:00 2001 From: "mengshi.sunmengshi" Date: Tue, 18 Feb 2014 19:00:30 +0800 Subject: [PATCH] comit --- .../tddl/executor/cursor/impl/AggregateCursor.java | 10 +++------- .../taobao/tddl/executor/rowset/AbstractRowSet.java | 5 +---- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/tddl-executor/src/main/java/com/taobao/tddl/executor/cursor/impl/AggregateCursor.java b/tddl-executor/src/main/java/com/taobao/tddl/executor/cursor/impl/AggregateCursor.java index 2ca52323..0919f87e 100644 --- a/tddl-executor/src/main/java/com/taobao/tddl/executor/cursor/impl/AggregateCursor.java +++ b/tddl-executor/src/main/java/com/taobao/tddl/executor/cursor/impl/AggregateCursor.java @@ -9,6 +9,8 @@ import com.taobao.tddl.common.exception.TddlException; import com.taobao.tddl.common.utils.GeneralUtil; +import com.taobao.tddl.common.utils.logger.Logger; +import com.taobao.tddl.common.utils.logger.LoggerFactory; import com.taobao.tddl.executor.cursor.IAggregateCursor; import com.taobao.tddl.executor.cursor.ICursorMeta; import com.taobao.tddl.executor.cursor.ISchematicCursor; @@ -24,9 +26,6 @@ import com.taobao.tddl.optimizer.core.expression.IOrderBy; import com.taobao.tddl.optimizer.core.expression.ISelectable; -import com.taobao.tddl.common.utils.logger.Logger; -import com.taobao.tddl.common.utils.logger.LoggerFactory; - /** * 用来计算聚合函数,group by * @@ -238,10 +237,7 @@ private void initSchema() throws TddlException { } } cursorMeta = CursorMetaImp.buildNew(retColumns, retColumns.size()); - if (logger.isDebugEnabled()) { - logger.warn("firstRowSetInCurrentGroup:\n" + firstRowSetInCurrentGroup); - logger.warn("cursorMeta:\n" + cursorMeta); - } + } private boolean isCurrentGroupByChanged(IRowSet kv) { diff --git a/tddl-executor/src/main/java/com/taobao/tddl/executor/rowset/AbstractRowSet.java b/tddl-executor/src/main/java/com/taobao/tddl/executor/rowset/AbstractRowSet.java index c2a263f4..2cb76c7f 100644 --- a/tddl-executor/src/main/java/com/taobao/tddl/executor/rowset/AbstractRowSet.java +++ b/tddl-executor/src/main/java/com/taobao/tddl/executor/rowset/AbstractRowSet.java @@ -172,10 +172,7 @@ public String toString() { for (ColumnMeta cm : this.getParentCursorMeta().getColumns()) { int index = this.getParentCursorMeta().getIndex(cm.getTableName(), cm.getName()); - if (index > this.getValues().size()) { - System.out.println("11"); - } - sb.append(cm.getName() + ":" + this.getString(index) + " "); + sb.append(cm.getName() + ":" + this.getValues().get(index) + " "); } return sb.toString(); }