本文整理汇总了Java中org.apache.drill.common.expression.ValueExpressions.TimeExpression类的典型用法代码示例。如果您正苦于以下问题:Java TimeExpression类的具体用法?Java TimeExpression怎么用?Java TimeExpression使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TimeExpression类属于org.apache.drill.common.expression.ValueExpressions包,在下文中一共展示了TimeExpression类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public HoldingContainer visitTimeConstant(TimeExpression e, ClassGenerator<?> generator) throws RuntimeException {
if (constantBoundaries.contains(e)) {
generator.getMappingSet().enterConstant();
HoldingContainer c = super.visitTimeConstant(e, generator);
return renderConstantExpression(generator, c);
} else if (generator.getMappingSet().isWithinConstant()) {
return super.visitTimeConstant(e, generator).setConstant(true);
} else {
return super.visitTimeConstant(e, generator);
}
}
示例2: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Void visitTimeConstant(TimeExpression lExpr, StringBuilder sb) throws RuntimeException {
sb.append("cast( ");
sb.append(lExpr.getTime());
sb.append(" as TIME)");
return null;
}
示例3: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public HoldingContainer visitTimeConstant(TimeExpression timeExpr, ClassGenerator<?> generator) throws RuntimeException {
HoldingContainer hc = getPrevious(timeExpr, generator.getMappingSet());
if (hc == null) {
hc = super.visitTimeConstant(timeExpr, generator);
put(timeExpr, hc, generator.getMappingSet());
}
return hc;
}
示例4: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Boolean visitTimeConstant(TimeExpression intExpr, LogicalExpression value) throws RuntimeException {
if (!(value instanceof TimeExpression)) {
return false;
}
return intExpr.getTime() == ((TimeExpression) value).getTime();
}
示例5: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Boolean visitTimeConstant(TimeExpression intExpr, IdentityHashMap<LogicalExpression, Object> value){
return true;
}
示例6: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public LogicalExpression visitTimeConstant(TimeExpression intExpr, FunctionLookupContext functionLookupContext) {
return intExpr;
}
示例7: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public T visitTimeConstant(TimeExpression intExpr, VAL value) throws EXCEP {
return visitUnknown(intExpr, value);
}
示例8: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Boolean visitTimeConstant(TimeExpression intExpr, ErrorCollector errors) {
return false;
}
示例9: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Boolean visitTimeConstant(TimeExpression intExpr, ErrorCollector errors) {
return true;
}
示例10: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Void visitTimeConstant(TimeExpression intExpr, ErrorCollector errors) throws RuntimeException {
return null;
}
示例11: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public T visitTimeConstant(TimeExpression intExpr, Void value) throws RuntimeException {
return visitTimeConstant(intExpr);
}
示例12: visitConvertExpression
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Boolean visitConvertExpression(ConvertExpression e,
LogicalExpression valueArg) throws RuntimeException {
if (e.getConvertFunction() == ConvertExpression.CONVERT_FROM
&& e.getInput() instanceof SchemaPath) {
String encodingType = e.getEncodingType();
switch (encodingType) {
case "INT_BE":
case "INT":
case "UINT_BE":
case "UINT":
case "UINT4_BE":
case "UINT4":
if (valueArg instanceof IntExpression
&& (isEqualityFn || encodingType.startsWith("U"))) {
this.value = ((IntExpression) valueArg).getInt();
}
break;
case "BIGINT_BE":
case "BIGINT":
case "UINT8_BE":
case "UINT8":
if (valueArg instanceof LongExpression
&& (isEqualityFn || encodingType.startsWith("U"))) {
this.value = ((LongExpression) valueArg).getLong();
}
break;
case "FLOAT":
if (valueArg instanceof FloatExpression && isEqualityFn) {
this.value = ((FloatExpression) valueArg).getFloat();
}
break;
case "DOUBLE":
if (valueArg instanceof DoubleExpression && isEqualityFn) {
this.value = ((DoubleExpression) valueArg).getDouble();
}
break;
case "TIME_EPOCH":
case "TIME_EPOCH_BE":
if (valueArg instanceof TimeExpression) {
this.value = ((TimeExpression) valueArg).getTime();
}
break;
case "DATE_EPOCH":
case "DATE_EPOCH_BE":
if (valueArg instanceof DateExpression) {
this.value = ((DateExpression) valueArg).getDate();
}
break;
case "BOOLEAN_BYTE":
if (valueArg instanceof BooleanExpression) {
this.value = ((BooleanExpression) valueArg).getBoolean();
}
break;
case "UTF8":
// let visitSchemaPath() handle this.
return e.getInput().accept(this, valueArg);
}
if (value != null) {
this.path = (SchemaPath) e.getInput();
return true;
}
}
return false;
}
示例13: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Object visitTimeConstant(TimeExpression intExpr, Void value)
throws RuntimeException {
return intExpr.getTime();
}
示例14: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Integer visitTimeConstant(TimeExpression intExpr, Void value) throws RuntimeException {
return compute(intExpr, 14);
}
示例15: visitTimeConstant
import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public LogicalExpression visitTimeConstant(TimeExpression intExpr, Void value) throws RuntimeException {
return visitUnknown(intExpr, value);
}