当前位置: 首页>>代码示例>>Java>>正文


Java TimeExpression类代码示例

本文整理汇总了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);
  }
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:14,代码来源:EvaluationVisitor.java

示例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;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:8,代码来源:ExpressionStringBuilder.java

示例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;
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:10,代码来源:EvaluationVisitor.java

示例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();
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:8,代码来源:EqualityVisitor.java

示例5: visitTimeConstant

import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Boolean visitTimeConstant(TimeExpression intExpr, IdentityHashMap<LogicalExpression, Object> value){
  return true;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:ConstantExpressionIdentifier.java

示例6: visitTimeConstant

import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public LogicalExpression visitTimeConstant(TimeExpression intExpr, FunctionLookupContext functionLookupContext) {
  return intExpr;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:ExpressionTreeMaterializer.java

示例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);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:AbstractExprVisitor.java

示例8: visitTimeConstant

import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Boolean visitTimeConstant(TimeExpression intExpr, ErrorCollector errors) {
    return false;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:AggregateChecker.java

示例9: visitTimeConstant

import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Boolean visitTimeConstant(TimeExpression intExpr, ErrorCollector errors) {
    return true;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:ConstantChecker.java

示例10: visitTimeConstant

import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Void visitTimeConstant(TimeExpression intExpr, ErrorCollector errors) throws RuntimeException {
  return null;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:ExpressionValidator.java

示例11: visitTimeConstant

import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public T visitTimeConstant(TimeExpression intExpr, Void value) throws RuntimeException {
  return visitTimeConstant(intExpr);
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:5,代码来源:SimpleExprVisitor.java

示例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;
}
 
开发者ID:skhalifa,项目名称:QDrill,代码行数:67,代码来源:MongoCompareFunctionProcessor.java

示例13: visitTimeConstant

import org.apache.drill.common.expression.ValueExpressions.TimeExpression; //导入依赖的package包/类
@Override
public Object visitTimeConstant(TimeExpression intExpr, Void value)
  throws RuntimeException {
  return intExpr.getTime();
}
 
开发者ID:fineoio,项目名称:drill-dynamo-adapter,代码行数:6,代码来源:SingleFunctionProcessor.java

示例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);
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:5,代码来源:HashVisitor.java

示例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);
}
 
开发者ID:axbaretto,项目名称:drill,代码行数:5,代码来源:CloneVisitor.java


注:本文中的org.apache.drill.common.expression.ValueExpressions.TimeExpression类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。