本文整理汇总了Java中org.apache.drill.common.expression.ValueExpressions.LongExpression方法的典型用法代码示例。如果您正苦于以下问题:Java ValueExpressions.LongExpression方法的具体用法?Java ValueExpressions.LongExpression怎么用?Java ValueExpressions.LongExpression使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.apache.drill.common.expression.ValueExpressions
的用法示例。
在下文中一共展示了ValueExpressions.LongExpression方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getType
import org.apache.drill.common.expression.ValueExpressions; //导入方法依赖的package包/类
/**
* Defines function return type and sets cast length as type precision
* if cast length is simple long expression.
*
* @param logicalExpressions logical expressions
* @param attributes function attributes
* @return return type
*/
@Override
public TypeProtos.MajorType getType(List<LogicalExpression> logicalExpressions, FunctionAttributes attributes) {
TypeProtos.MajorType.Builder builder = TypeProtos.MajorType.newBuilder()
.setMinorType(attributes.getReturnValue().getType().getMinorType())
.setMode(FunctionUtils.getReturnTypeDataMode(logicalExpressions, attributes));
LogicalExpression logicalExpression = logicalExpressions.get(1);
if (logicalExpressions.get(1) instanceof ValueExpressions.LongExpression) {
long precision = ((ValueExpressions.LongExpression) logicalExpression).getLong();
builder.setPrecision(Ints.checkedCast(precision));
}
return builder.build();
}
示例2: visitLongConstant
import org.apache.drill.common.expression.ValueExpressions; //导入方法依赖的package包/类
@Override
public ValueHolder visitLongConstant(ValueExpressions.LongExpression intExpr, Integer value) throws RuntimeException {
return ValueHolderHelper.getBigIntHolder(intExpr.getLong());
}
示例3: visitLongConstant
import org.apache.drill.common.expression.ValueExpressions; //导入方法依赖的package包/类
@Override
public Statistics visitLongConstant(ValueExpressions.LongExpression expr, Void value) throws RuntimeException {
return getStatistics(expr.getLong());
}
示例4: visitLongConstant
import org.apache.drill.common.expression.ValueExpressions; //导入方法依赖的package包/类
@Override
public LogicalExpression visitLongConstant(ValueExpressions.LongExpression intExpr, Set<LogicalExpression> value)
throws RuntimeException {
return intExpr;
}