本文整理汇总了Java中org.apache.calcite.schema.Statistic类的典型用法代码示例。如果您正苦于以下问题:Java Statistic类的具体用法?Java Statistic怎么用?Java Statistic使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Statistic类属于org.apache.calcite.schema包,在下文中一共展示了Statistic类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
public Statistic getStatistic() {
return new Statistic() {
public Double getRowCount() {
return table.rowCount;
}
public boolean isKey(ImmutableBitSet columns) {
return table.isKey(columns);
}
public List<RelReferentialConstraint> getReferentialConstraints() {
return table.getReferentialConstraints();
}
public List<RelCollation> getCollations() {
return table.collationList;
}
public RelDistribution getDistribution() {
return table.getDistribution();
}
};
}
示例2: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
@Override
public Statistic getStatistic() {
return new StatisticImpl() {
@Override
public Double getRowCount() {
return (double) dataset.getReadDefinition().getScanStats().getRecordCount();
}
};
}
示例3: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
@Override
public Statistic getStatistic() {
return new StatisticImpl() {
@Override
public Double getRowCount() {
return (double) datasetAccessor.getDataset().getReadDefinition().getScanStats().getRecordCount();
}
};
}
示例4: buildStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
private Statistic buildStatistic() {
if (stats != null || primaryKey == -1) {
return stats;
}
Direction dir = primaryKeyMonotonicity == INCREASING ? ASCENDING : DESCENDING;
RelFieldCollation collation = new RelFieldCollation(primaryKey, dir, NullDirection.UNSPECIFIED);
return Statistics.of(fields.size(), ImmutableList.of(ImmutableBitSet.of(primaryKey)),
ImmutableList.of(RelCollations.of(collation)));
}
示例5: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
@Override
public Statistic getStatistic() {
int counter = 0;
for (IThreadStack threadStack : getThreadStacks()) {
counter += threadStack.getStackFrames().length;
}
return Statistics.of(counter, ImmutableList.of(ImmutableBitSet.of(0, 1)));
}
示例6: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
public Statistic getStatistic() {
final List<ImmutableBitSet> keys = Lists.newArrayList();
final Content content = supplier.get();
for (Ord<Column> ord : Ord.zip(content.columns)) {
if (ord.e.cardinality == content.size) {
keys.add(ImmutableBitSet.of(ord.i));
}
}
return Statistics.of(content.size, keys, content.collations);
}
示例7: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
@Override
public Statistic getStatistic() {
return Statistics.UNKNOWN;
}
示例8: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
@Override
public Statistic getStatistic() {
return Statistics.of(tableManager.getStats().getTablesize(),
keys);
}
示例9: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
@Override
public Statistic getStatistic() {
return Statistics.of(desc.getItemCount(), ImmutableList.of(), ImmutableList.of());
}
示例10: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
/**
* Not used {@link Statistic} to optimize the plan.
*/
@Override
public Statistic getStatistic() {
return Statistics.UNKNOWN;
}
示例11: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
@Override
public Statistic getStatistic() {
return drillTable.getStatistic();
}
示例12: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
@Override
public Statistic getStatistic() {
throw new UnsupportedOperationException(
"Statistic was not retrieved when this table had been being requested");
}
示例13: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
@Override
public Statistic getStatistic()
{
return Statistics.of(100d, ImmutableList.<ImmutableBitSet>of(), RelCollations.createSingleton(0));
}
示例14: statistics
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
public TableBuilderInfo statistics(Statistic stats) {
this.stats = stats;
return this;
}
示例15: getStatistic
import org.apache.calcite.schema.Statistic; //导入依赖的package包/类
public Statistic getStatistic() {
return Statistics.of(0d, ImmutableList.<ImmutableBitSet>of());
}