本文整理汇总了Java中com.taobao.tddl.executor.utils.ExecUtils.getComp方法的典型用法代码示例。如果您正苦于以下问题:Java ExecUtils.getComp方法的具体用法?Java ExecUtils.getComp怎么用?Java ExecUtils.getComp使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.taobao.tddl.executor.utils.ExecUtils
的用法示例。
在下文中一共展示了ExecUtils.getComp方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initSchema
import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
private void initSchema(IRowSet firstRowSet, IFilter lf) {
if (schemaInited) {
return;
}
schemaInited = true;
List<ColumnMeta> columnMetas = to.getParentCursorMeta().getColumns();
List<ISelectable> iColumns = ExecUtils.getIColumnsWithISelectable(columnMetas.toArray(new ColumnMeta[0]));
toComparator = ExecUtils.getComp(iColumns,
iColumns,
to.getParentCursorMeta(),
firstRowSet.getParentCursorMeta());
fromComparator = ExecUtils.getComp(iColumns,
iColumns,
from.getParentCursorMeta(),
firstRowSet.getParentCursorMeta());
// init(rangeFilters);
}
示例2: initComparator
import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
protected void initComparator(List<IOrderBy> orderBys, ICursorMeta cursorMeta) {
if (schemaInited) {
return;
}
schemaInited = true;
if (orderBys != null) {
this.kvPairComparator = ExecUtils.getComp(orderBys, cursorMeta);
}
}
示例3: buildSchemaInJoin
import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
protected void buildSchemaInJoin(ICursorMeta leftCursorMeta, ICursorMeta rightCursorMeta) throws TddlException {
if (schemaInited) {
return;
}
schemaInited = true;
// 以左面数据顺序,作为排序
setOrderBy(left_cursor);
List<ColumnMeta> leftColumns = leftCursorMeta.getColumns();
List<ColumnMeta> rightColumns = rightCursorMeta.getColumns();
this.kvPairComparator = ExecUtils.getComp(this.leftJoinOnColumns,
this.rightJoinOnColumns,
leftCursorMeta,
rightCursorMeta);
List<ColumnMeta> newJoinColumnMsg = new ArrayList<ColumnMeta>(leftColumns.size() + rightColumns.size());
rightCursorOffset = leftCursorMeta.getIndexRange();
newJoinColumnMsg.addAll(leftColumns);
newJoinColumnMsg.addAll(rightColumns);
List<Integer> indexes = new ArrayList<Integer>(newJoinColumnMsg.size());
addIndexToNewIndexes(leftCursorMeta, leftColumns, indexes, 0);
addIndexToNewIndexes(rightCursorMeta, rightColumns, indexes, rightCursorOffset);
ICursorMeta cursorMetaImpJoin = CursorMetaImp.buildNew(newJoinColumnMsg,
indexes,
(leftCursorMeta.getIndexRange() + rightCursorMeta.getIndexRange()));
// setMeta(cursorMetaImpJoin);
this.joinCursorMeta = cursorMetaImpJoin;
}
示例4: compare
import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
private int compare(IRowSet row1, IRowSet row2, List columns1, List columns2) {
Comparator kvPairComparator = ExecUtils.getComp(columns1,
columns2,
row1.getParentCursorMeta(),
row2.getParentCursorMeta());
return kvPairComparator.compare(row1, row2);
}
示例5: buildSchemaInJoin
import com.taobao.tddl.executor.utils.ExecUtils; //导入方法依赖的package包/类
protected void buildSchemaInJoin(ICursorMeta leftCursorMeta, ICursorMeta rightCursorMeta) {
if (schemaInited) {
return;
}
schemaInited = true;
// 以左面数据顺序,作为排序
setOrderBy(left_cursor);
List<ColumnMeta> leftColumns = leftCursorMeta.getColumns();
List<ColumnMeta> rightColumns = rightCursorMeta.getColumns();
this.kvPairComparator = ExecUtils.getComp(this.leftJoinOnColumns,
this.rightJoinOnColumns,
leftCursorMeta,
rightCursorMeta);
List<ColumnMeta> newJoinColumnMsg = new ArrayList<ColumnMeta>(leftColumns.size() + rightColumns.size());
rightCursorOffset = leftCursorMeta.getIndexRange();
newJoinColumnMsg.addAll(leftColumns);
newJoinColumnMsg.addAll(rightColumns);
List<Integer> indexes = new ArrayList<Integer>(newJoinColumnMsg.size());
addIndexToNewIndexes(leftCursorMeta, leftColumns, indexes, 0);
addIndexToNewIndexes(rightCursorMeta, rightColumns, indexes, rightCursorOffset);
ICursorMeta cursorMetaImpJoin = CursorMetaImp.buildNew(newJoinColumnMsg,
indexes,
(leftCursorMeta.getIndexRange() + rightCursorMeta.getIndexRange()));
// setMeta(cursorMetaImpJoin);
this.joinCursorMeta = cursorMetaImpJoin;
}