本文整理了Java中org.apache.kylin.common.util.Dictionary.getMinId()
方法的一些代码示例,展示了Dictionary.getMinId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Dictionary.getMinId()
方法的具体详情如下:
包路径:org.apache.kylin.common.util.Dictionary
类名称:Dictionary
方法名:getMinId
暂无
代码示例来源:origin: apache/kylin
public int getSize() {
return getMaxId() - getMinId() + 1;
}
代码示例来源:origin: apache/kylin
public MultipleDictionaryValueEnumerator(DataType dataType, List<DictionaryInfo> dictionaryInfoList) {
this.dataType = dataType;
dictionaryList = Lists.newArrayListWithCapacity(dictionaryInfoList.size());
for (DictionaryInfo dictInfo : dictionaryInfoList) {
Dictionary<String> dictionary = (Dictionary<String>) dictInfo.getDictionaryObject();
dictionaryList.add((Dictionary<String>) dictInfo.getDictionaryObject());
curKeys.add(dictionary.getMinId());
}
}
代码示例来源:origin: apache/kylin
public List<T> enumeratorValues() {
List<T> ret = Lists.newArrayListWithExpectedSize(getSize());
for (int i = getMinId(); i <= getMaxId(); i++) {
ret.add(getValueFromId(i));
}
return ret;
}
代码示例来源:origin: apache/kylin
public ShrunkenDictionary<T> build(ValueSerializer<T> valueSerializer) {
return new ShrunkenDictionary<>(valueSerializer, fullDict.getMinId(), fullDict.getMaxId(),
fullDict.getSizeOfId(), fullDict.getSizeOfValue(), valueToIdMap);
}
}
代码示例来源:origin: apache/kylin
@Override
public boolean contains(Dictionary other) {
if (other.getSize() > this.getSize()) {
return false;
}
for (int i = other.getMinId(); i <= other.getMaxId(); ++i) {
T v = (T) other.getValueFromId(i);
if (!this.containsValue(v)) {
return false;
}
}
return true;
}
代码示例来源:origin: apache/kylin
@Override
public boolean contains(Dictionary other) {
if (other.getSize() > this.getSize()) {
return false;
}
for (int i = other.getMinId(); i <= other.getMaxId(); ++i) {
T v = (T) other.getValueFromId(i);
if (!this.containsValue(v)) {
return false;
}
}
return true;
}
代码示例来源:origin: apache/kylin
for (int i = dict.getMinId(); i <= dict.getMaxId(); i++) {
Object dictVal = dict.getValueFromId(i);
Object computedVal = builtInFunctionTupleFilter.invokeFunction(dictVal);
代码示例来源:origin: apache/kylin
private TupleFilter translateFunctionTupleFilter(BuiltInFunctionTupleFilter builtInFunctionTupleFilter) {
if (!builtInFunctionTupleFilter.isValid())
return null;
TblColRef columnRef = builtInFunctionTupleFilter.getColumn();
Dictionary<?> dict = dimEncMap.getDictionary(columnRef);
if (dict == null)
return null;
CompareTupleFilter translated = new CompareTupleFilter(builtInFunctionTupleFilter.isReversed() ? FilterOperatorEnum.NOTIN : FilterOperatorEnum.IN);
translated.addChild(new ColumnTupleFilter(columnRef));
try {
int translatedInClauseMaxSize = KylinConfig.getInstanceFromEnv().getTranslatedInClauseMaxSize();
for (int i = dict.getMinId(); i <= dict.getMaxId(); i++) {
Object dictVal = dict.getValueFromId(i);
if ((Boolean) builtInFunctionTupleFilter.invokeFunction(dictVal)) {
translated.addChild(new ConstantTupleFilter(dictVal));
if (translated.getChildren().size() > translatedInClauseMaxSize) {
return null;
}
}
}
logger.debug("getting a in clause with {} children", translated.getChildren().size());
} catch (Exception e) {
logger.debug(e.getMessage());
return null;
}
return translated;
}
代码示例来源:origin: org.apache.kylin/kylin-dictionary
public MultipleDictionaryValueEnumerator(List<DictionaryInfo> dictionaryInfoList) {
dictionaryList = Lists.newArrayListWithCapacity(dictionaryInfoList.size());
for (DictionaryInfo dictInfo : dictionaryInfoList) {
dictionaryList.add(dictInfo.getDictionaryObject());
}
if (!dictionaryList.isEmpty()) {
curDict = dictionaryList.get(0);
curKey = curDict.getMinId();
}
}
代码示例来源:origin: org.apache.kylin/kylin-core-common
public int getSize() {
return getMaxId() - getMinId() + 1;
}
代码示例来源:origin: org.apache.kylin/kylin-common
public int getSize() {
return getMaxId() - getMinId() + 1;
}
代码示例来源:origin: org.apache.kylin/kylin-core-dictionary
public MultipleDictionaryValueEnumerator(DataType dataType, List<DictionaryInfo> dictionaryInfoList) {
this.dataType = dataType;
dictionaryList = Lists.newArrayListWithCapacity(dictionaryInfoList.size());
for (DictionaryInfo dictInfo : dictionaryInfoList) {
Dictionary<String> dictionary = (Dictionary<String>) dictInfo.getDictionaryObject();
dictionaryList.add((Dictionary<String>) dictInfo.getDictionaryObject());
curKeys.add(dictionary.getMinId());
}
}
代码示例来源:origin: org.apache.kylin/kylin-core-common
public List<T> enumeratorValues() {
List<T> ret = Lists.newArrayListWithExpectedSize(getSize());
for (int i = getMinId(); i <= getMaxId(); i++) {
ret.add(getValueFromId(i));
}
return ret;
}
代码示例来源:origin: org.apache.kylin/kylin-dictionary
@Override
public boolean moveNext() throws IOException {
if (curDictIndex < dictionaryList.size() && curKey <= curDict.getMaxId()) {
byte[] buffer = new byte[curDict.getSizeOfValue()];
int size = curDict.getValueBytesFromId(curKey, buffer, 0);
curValue = Bytes.copy(buffer, 0, size);
if (++curKey > curDict.getMaxId()) {
if (++curDictIndex < dictionaryList.size()) {
curDict = dictionaryList.get(curDictIndex);
curKey = curDict.getMinId();
}
}
return true;
}
curValue = null;
return false;
}
代码示例来源:origin: org.apache.kylin/kylin-core-dictionary
public ShrunkenDictionary<T> build(ValueSerializer<T> valueSerializer) {
return new ShrunkenDictionary<>(valueSerializer, fullDict.getMinId(), fullDict.getMaxId(),
fullDict.getSizeOfId(), fullDict.getSizeOfValue(), valueToIdMap);
}
}
代码示例来源:origin: org.apache.kylin/kylin-core-dictionary
@Override
public boolean contains(Dictionary other) {
if (other.getSize() > this.getSize()) {
return false;
}
for (int i = other.getMinId(); i <= other.getMaxId(); ++i) {
T v = (T) other.getValueFromId(i);
if (!this.containsValue(v)) {
return false;
}
}
return true;
}
代码示例来源:origin: org.apache.kylin/kylin-core-dictionary
@Override
public boolean contains(Dictionary other) {
if (other.getSize() > this.getSize()) {
return false;
}
for (int i = other.getMinId(); i <= other.getMaxId(); ++i) {
T v = (T) other.getValueFromId(i);
if (!this.containsValue(v)) {
return false;
}
}
return true;
}
代码示例来源:origin: org.apache.kylin/kylin-core-dictionary
private TupleFilter translateFunctionTupleFilter(BuiltInFunctionTupleFilter builtInFunctionTupleFilter) {
if (!builtInFunctionTupleFilter.isValid())
return null;
TblColRef columnRef = builtInFunctionTupleFilter.getColumn();
Dictionary<?> dict = dimEncMap.getDictionary(columnRef);
if (dict == null)
return null;
CompareTupleFilter translated = new CompareTupleFilter(builtInFunctionTupleFilter.isReversed() ? FilterOperatorEnum.NOTIN : FilterOperatorEnum.IN);
translated.addChild(new ColumnTupleFilter(columnRef));
try {
int translatedInClauseMaxSize = KylinConfig.getInstanceFromEnv().getTranslatedInClauseMaxSize();
for (int i = dict.getMinId(); i <= dict.getMaxId(); i++) {
Object dictVal = dict.getValueFromId(i);
if ((Boolean) builtInFunctionTupleFilter.invokeFunction(dictVal)) {
translated.addChild(new ConstantTupleFilter(dictVal));
if (translated.getChildren().size() > translatedInClauseMaxSize) {
return null;
}
}
}
logger.debug("getting a in clause with {} children", translated.getChildren().size());
} catch (Exception e) {
logger.debug(e.getMessage());
return null;
}
return translated;
}
代码示例来源:origin: org.apache.kylin/kylin-core-dictionary
for (int i = dict.getMinId(); i <= dict.getMaxId(); i++) {
Object dictVal = dict.getValueFromId(i);
Object computedVal = builtInFunctionTupleFilter.invokeFunction(dictVal);
内容来源于网络,如有侵权,请联系作者删除!