热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc.getTypeInfo()方法的使用及代码示例

本文整理了Java中org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc.getTypeInfo()方法的一些代码示例,展

本文整理了Java中org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc.getTypeInfo()方法的一些代码示例,展示了ExprNodeColumnDesc.getTypeInfo()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ExprNodeColumnDesc.getTypeInfo()方法的具体详情如下:
包路径:org.apache.hadoop.hive.ql.plan.ExprNodeColumnDesc
类名称:ExprNodeColumnDesc
方法名:getTypeInfo

ExprNodeColumnDesc.getTypeInfo介绍

暂无

代码示例

代码示例来源:origin: apache/hive

@Override
public boolean isSame(Object o) {
if (!(o instanceof ExprNodeColumnDesc)) {
return false;
}
ExprNodeColumnDesc dest = (ExprNodeColumnDesc) o;
if (!column.equals(dest.getColumn())) {
return false;
}
if (!typeInfo.equals(dest.getTypeInfo())) {
return false;
}
if ( tabAlias != null && dest.tabAlias != null ) {
if ( !tabAlias.equals(dest.tabAlias) ) {
return false;
}
}
return true;
}

代码示例来源:origin: apache/drill

@Override
public boolean isSame(Object o) {
if (!(o instanceof ExprNodeColumnDesc)) {
return false;
}
ExprNodeColumnDesc dest = (ExprNodeColumnDesc) o;
if (!column.equals(dest.getColumn())) {
return false;
}
if (!typeInfo.equals(dest.getTypeInfo())) {
return false;
}
if ( tabAlias != null && dest.tabAlias != null ) {
if ( !tabAlias.equals(dest.tabAlias) ) {
return false;
}
}
return true;
}

代码示例来源:origin: apache/hive

/**
* Converts the skewedValue available as a string in the metadata to the appropriate object
* by using the type of the column from the join key.
* @param skewedValue
* @param keyCol
* @return an expression node descriptor of the appropriate constant
*/
private ExprNodeConstantDesc createConstDesc(
String skewedValue, ExprNodeColumnDesc keyCol) {
ObjectInspector inputOI = TypeInfoUtils.getStandardJavaObjectInspectorFromTypeInfo(
TypeInfoFactory.stringTypeInfo);
ObjectInspector outputOI = TypeInfoUtils.getStandardJavaObjectInspectorFromTypeInfo(
keyCol.getTypeInfo());
Converter cOnverter= ObjectInspectorConverters.getConverter(inputOI, outputOI);
Object skewedValueObject = converter.convert(skewedValue);
return new ExprNodeConstantDesc(keyCol.getTypeInfo(), skewedValueObject);
}

代码示例来源:origin: apache/drill

/**
* Converts the skewedValue available as a string in the metadata to the appropriate object
* by using the type of the column from the join key.
* @param skewedValue
* @param keyCol
* @return an expression node descriptor of the appropriate constant
*/
private ExprNodeConstantDesc createConstDesc(
String skewedValue, ExprNodeColumnDesc keyCol) {
ObjectInspector inputOI = TypeInfoUtils.getStandardJavaObjectInspectorFromTypeInfo(
TypeInfoFactory.stringTypeInfo);
ObjectInspector outputOI = TypeInfoUtils.getStandardJavaObjectInspectorFromTypeInfo(
keyCol.getTypeInfo());
Converter cOnverter= ObjectInspectorConverters.getConverter(inputOI, outputOI);
Object skewedValueObject = converter.convert(skewedValue);
return new ExprNodeConstantDesc(keyCol.getTypeInfo(), skewedValueObject);
}

代码示例来源:origin: apache/hive

private static boolean sameTypeIndexSearchConditions(List searchConditions) {
for (IndexSearchCondition isc : searchConditions) {
if (!isc.getColumnDesc().getTypeInfo().equals(isc.getConstantDesc().getTypeInfo())) {
return false;
}
}
return true;
}
}

代码示例来源:origin: apache/hive

@Override
protected ExprNodeDesc processColumnDesc(NodeProcessorCtx procCtx, ExprNodeColumnDesc cd) {
ExprNodeDesc newcd;
ExprProcCtx epc = (ExprProcCtx) procCtx;
if (cd.getTabAlias().equalsIgnoreCase(epc.getTabAlias())
&& cd.getIsPartitionColOrVirtualCol()) {
newcd = cd.clone();
} else {
newcd = new ExprNodeConstantDesc(cd.getTypeInfo(), null);
}
return newcd;
}
}

代码示例来源:origin: apache/drill

@Override
protected ExprNodeDesc processColumnDesc(NodeProcessorCtx procCtx, ExprNodeColumnDesc cd) {
ExprNodeDesc newcd;
ExprProcCtx epc = (ExprProcCtx) procCtx;
if (cd.getTabAlias().equalsIgnoreCase(epc.getTabAlias())
&& cd.getIsPartitionColOrVirtualCol()) {
newcd = cd.clone();
} else {
newcd = new ExprNodeConstantDesc(cd.getTypeInfo(), null);
}
return newcd;
}
}

代码示例来源:origin: apache/hive

&& !constant.getTypeInfo().equals(desc.getTypeInfo())) {
return typeCast(constant, desc.getTypeInfo());

代码示例来源:origin: apache/hive

@Override
protected ExprNodeDesc processColumnDesc(NodeProcessorCtx procCtx, ExprNodeColumnDesc cd) {
ExprNodeDesc newcd;
LBExprProcCtx ctx = (LBExprProcCtx) procCtx;
Partition part = ctx.getPart();
if (cd.getTabAlias().equalsIgnoreCase(ctx.getTabAlias())
&& isPruneForListBucketing(part, cd.getColumn())) {
newcd = cd.clone();
} else {
newcd = new ExprNodeConstantDesc(cd.getTypeInfo(), null);
}
return newcd;
}

代码示例来源:origin: apache/hive

columns.add(columnConstant.left);
names.add(columnConstant.left.getColumn());
typeInfos.add(columnConstant.left.getTypeInfo());

代码示例来源:origin: apache/drill

@Override
protected ExprNodeDesc processColumnDesc(NodeProcessorCtx procCtx, ExprNodeColumnDesc cd) {
ExprNodeDesc newcd;
LBExprProcCtx ctx = (LBExprProcCtx) procCtx;
Partition part = ctx.getPart();
if (cd.getTabAlias().equalsIgnoreCase(ctx.getTabAlias())
&& isPruneForListBucketing(part, cd.getColumn())) {
newcd = cd.clone();
} else {
newcd = new ExprNodeConstantDesc(cd.getTypeInfo(), null);
}
return newcd;
}

代码示例来源:origin: apache/drill

&& !constant.getTypeInfo().equals(desc.getTypeInfo())) {
return typeCast(constant, desc.getTypeInfo());

代码示例来源:origin: apache/hive

continue;
TypeInfo typeInfo = searchConditions.get(0).getColumnDesc().getTypeInfo();
if (typeInfo.getCategory() == Category.PRIMITIVE && PrimitiveObjectInspectorUtils.getPrimitiveGrouping(
((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory()) == PrimitiveGrouping.NUMERIC_GROUP) {

代码示例来源:origin: apache/hive

ve.setInputTypeInfos(groupingIdColDesc.getTypeInfo());
ve.setInputDataTypePhysicalVariations(DataTypePhysicalVariation.NONE);

代码示例来源:origin: apache/hive

identityTypeInfo = colDesc.getTypeInfo();

代码示例来源:origin: apache/hive

private VectorExpression getColumnVectorExpression(ExprNodeColumnDesc exprDesc,
VectorExpressionDescriptor.Mode mode) throws HiveException {
int columnNum = getInputColumnIndex(exprDesc.getColumn());
VectorExpression expr;
switch (mode) {
case FILTER:
expr = getFilterOnBooleanColumnExpression(exprDesc, columnNum);
break;
case PROJECTION:
{
expr = new IdentityExpression(columnNum);
TypeInfo identityTypeInfo = exprDesc.getTypeInfo();
DataTypePhysicalVariation identityDataTypePhysicalVariation =
getDataTypePhysicalVariation(columnNum);
expr.setInputTypeInfos(identityTypeInfo);
expr.setInputDataTypePhysicalVariations(identityDataTypePhysicalVariation);
expr.setOutputTypeInfo(identityTypeInfo);
expr.setOutputDataTypePhysicalVariation(identityDataTypePhysicalVariation);
}
break;
default:
throw new RuntimeException("Unexpected mode " + mode);
}
return expr;
}

代码示例来源:origin: apache/drill

descs.add(columnDesc);
colNames.add(columnDesc.getExprString());
if (columnDesc.getTypeInfo().getCategory() == ObjectInspector.Category.PRIMITIVE
&& ((PrimitiveTypeInfo) columnDesc.getTypeInfo()).getPrimitiveCategory() == PrimitiveCategory.TIMESTAMP) {
if (timestampPos != -1) {
throw new SemanticException("Multiple columns with timestamp type on query result; "

代码示例来源:origin: apache/hive

TypeInfo typeInfo = exprDesc.getTypeInfo();
if (typeInfo.getCategory() == Category.PRIMITIVE &&
((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory() == PrimitiveCategory.BOOLEAN) {

代码示例来源:origin: apache/drill

case FILTER:
TypeInfo typeInfo = exprDesc.getTypeInfo();
if (typeInfo.getCategory() == Category.PRIMITIVE &&
((PrimitiveTypeInfo) typeInfo).getPrimitiveCategory() == PrimitiveCategory.BOOLEAN) {

代码示例来源:origin: apache/hive

colType = encd.getTypeInfo().getTypeName();
countDistincts = numRows;
} else {

推荐阅读
author-avatar
手机用户2502913717
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有