当前位置: 首页>>代码示例>>Java>>正文


Java RelOptUtil.EPSILON属性代码示例

本文整理汇总了Java中org.apache.calcite.plan.RelOptUtil.EPSILON属性的典型用法代码示例。如果您正苦于以下问题:Java RelOptUtil.EPSILON属性的具体用法?Java RelOptUtil.EPSILON怎么用?Java RelOptUtil.EPSILON使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.apache.calcite.plan.RelOptUtil的用法示例。


在下文中一共展示了RelOptUtil.EPSILON属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: isEqWithEpsilon

@Override
public boolean isEqWithEpsilon(RelOptCost other) {
  if (!(other instanceof DrillCostBase)) {
    return false;
  }
  DrillCostBase that = (DrillCostBase) other;
  return (this == that)
    || ((Math.abs(this.cpu - that.cpu) < RelOptUtil.EPSILON)
        && (Math.abs(this.io - that.io) < RelOptUtil.EPSILON)
        && (Math.abs(this.network - that.network) < RelOptUtil.EPSILON)
        && (Math.abs(this.rowCount - that.rowCount) < RelOptUtil.EPSILON)
        && (Math.abs(this.memory - that.memory) < RelOptUtil.EPSILON));
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:13,代码来源:DrillCostBase.java

示例2: isEqWithEpsilon

@Override
public boolean isEqWithEpsilon(org.apache.calcite.plan.RelOptCost other) {
  if (!(other instanceof DremioCost)) {
    return false;
  }
  DremioCost that = (DremioCost) other;
  return (this == that)
    || ((Math.abs(this.cpu - that.cpu) < RelOptUtil.EPSILON)
        && (Math.abs(this.io - that.io) < RelOptUtil.EPSILON)
        && (Math.abs(this.network - that.network) < RelOptUtil.EPSILON)
        && (Math.abs(this.rowCount - that.rowCount) < RelOptUtil.EPSILON)
        && (Math.abs(this.memory - that.memory) < RelOptUtil.EPSILON));
}
 
开发者ID:dremio,项目名称:dremio-oss,代码行数:13,代码来源:DremioCost.java

示例3: swapInputs

/**
 * Swaps the operands to a join, so the smaller input is on the right. Or,
 * if this is a removable self-join, swap so the factor that should be
 * preserved when the self-join is removed is put on the left.
 *
 * @param multiJoin join factors being optimized
 * @param left left side of join tree
 * @param right right hand side of join tree
 * @param selfJoin true if the join is a removable self-join
 *
 * @return true if swapping should be done
 */
private boolean swapInputs(
    RelMetadataQuery mq,
    LoptMultiJoin multiJoin,
    LoptJoinTree left,
    LoptJoinTree right,
    boolean selfJoin) {
  boolean swap = false;

  if (selfJoin) {
    return !multiJoin.isLeftFactorInRemovableSelfJoin(
        ((LoptJoinTree.Leaf) left.getFactorTree()).getId());
  }

  final Double leftRowCount = mq.getRowCount(left.getJoinTree());
  final Double rightRowCount = mq.getRowCount(right.getJoinTree());

  // The left side is smaller than the right if it has fewer rows,
  // or if it has the same number of rows as the right (excluding
  // roundoff), but fewer columns.
  if ((leftRowCount != null)
      && (rightRowCount != null)
      && ((leftRowCount < rightRowCount)
      || ((Math.abs(leftRowCount - rightRowCount)
      < RelOptUtil.EPSILON)
      && (rowWidthCost(left.getJoinTree())
      < rowWidthCost(right.getJoinTree()))))) {
    swap = true;
  }
  return swap;
}
 
开发者ID:apache,项目名称:calcite,代码行数:42,代码来源:LoptOptimizeJoinRule.java

示例4: isEqWithEpsilon

public boolean isEqWithEpsilon(RelOptCost other) {
  if (!(other instanceof VolcanoCost)) {
    return false;
  }
  VolcanoCost that = (VolcanoCost) other;
  return (this == that)
      || ((Math.abs(this.rowCount - that.rowCount) < RelOptUtil.EPSILON)
      && (Math.abs(this.cpu - that.cpu) < RelOptUtil.EPSILON)
      && (Math.abs(this.io - that.io) < RelOptUtil.EPSILON));
}
 
开发者ID:apache,项目名称:calcite,代码行数:10,代码来源:VolcanoCost.java


注:本文中的org.apache.calcite.plan.RelOptUtil.EPSILON属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。