Tabnine Logo
ScalarFunctionCallExpression.getArguments
Code IndexAdd Tabnine to your IDE (free)

How to use
getArguments
method
in
org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression

Best Java code snippets using org.apache.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression.getArguments (Showing top 12 results out of 315)

origin: apache/asterixdb

public static void resetLOJMissingPlaceholderVarInGroupByOp(AccessMethodAnalysisContext analysisCtx,
    LogicalVariable newMissingPlaceholderVaraible, IOptimizationContext context) throws AlgebricksException {
  //reset the missing placeholder variable in groupby operator
  ScalarFunctionCallExpression isMissingFuncExpr = analysisCtx.getLOJIsMissingFuncInGroupBy();
  isMissingFuncExpr.getArguments().clear();
  VariableReferenceExpression newMissingVarRef = new VariableReferenceExpression(newMissingPlaceholderVaraible);
  newMissingVarRef.setSourceLocation(isMissingFuncExpr.getSourceLocation());
  isMissingFuncExpr.getArguments().add(new MutableObject<ILogicalExpression>(newMissingVarRef));
  //recompute type environment.
  OperatorPropertiesUtil.typeOpRec(analysisCtx.getLOJGroupbyOpRef(), context);
}
origin: apache/asterixdb

/**
 * Inject a dynamic cast function wrapping an existing expression
 *
 * @param funcInfo
 *            the cast function
 * @param reqType
 *            the required type
 * @param inputType
 *            the original type
 * @param exprRef
 *            the expression reference
 * @param argExpr
 *            the original expression
 * @throws AlgebricksException
 */
private static void injectCastFunction(IFunctionInfo funcInfo, IAType reqType, IAType inputType,
    Mutable<ILogicalExpression> exprRef, ILogicalExpression argExpr) throws AlgebricksException {
  ScalarFunctionCallExpression cast = new ScalarFunctionCallExpression(funcInfo);
  cast.getArguments().add(new MutableObject<ILogicalExpression>(argExpr));
  exprRef.setValue(cast);
  TypeCastUtils.setRequiredAndInputTypes(cast, reqType, inputType);
}
origin: apache/asterixdb

private static ScalarFunctionCallExpression getNestedIsMissingCall(AbstractFunctionCallExpression call,
    OptimizableOperatorSubTree rightSubTree) throws AlgebricksException {
  ScalarFunctionCallExpression isMissingFuncExpr;
  if (call.getFunctionIdentifier().equals(AlgebricksBuiltinFunctions.NOT)) {
    if (call.getArguments().get(0).getValue().getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
      if (((AbstractFunctionCallExpression) call.getArguments().get(0).getValue()).getFunctionIdentifier()
          .equals(AlgebricksBuiltinFunctions.IS_MISSING)) {
        isMissingFuncExpr = (ScalarFunctionCallExpression) call.getArguments().get(0).getValue();
        if (isMissingFuncExpr.getArguments().get(0).getValue()
            .getExpressionTag() == LogicalExpressionTag.VARIABLE) {
          LogicalVariable var =
              ((VariableReferenceExpression) isMissingFuncExpr.getArguments().get(0).getValue())
                  .getVariableReference();
          List<LogicalVariable> liveSubplanVars = new ArrayList<>();
          VariableUtilities.getSubplanLocalLiveVariables(rightSubTree.getRoot(), liveSubplanVars);
          if (liveSubplanVars.contains(var)) {
            return isMissingFuncExpr;
          }
        }
      }
    }
  }
  return null;
}
origin: apache/asterixdb

public static void prepareMetaKeyAccessExpression(List<String> field, LogicalVariable resVar,
    List<Mutable<ILogicalExpression>> assignExpressions, List<LogicalVariable> vars,
    List<Mutable<ILogicalExpression>> varRefs, IVariableContext context, SourceLocation sourceLoc) {
  IAObject value = (field.size() > 1) ? new AOrderedList(field) : new AString(field.get(0));
  ScalarFunctionCallExpression metaKeyFunction =
      new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(BuiltinFunctions.META_KEY));
  metaKeyFunction.setSourceLocation(sourceLoc);
  VariableReferenceExpression resVarRef = new VariableReferenceExpression(resVar);
  resVarRef.setSourceLocation(sourceLoc);
  metaKeyFunction.getArguments().add(new MutableObject<ILogicalExpression>(resVarRef));
  metaKeyFunction.getArguments()
      .add(new MutableObject<>(new ConstantExpression(new AsterixConstantValue(value))));
  assignExpressions.add(new MutableObject<ILogicalExpression>(metaKeyFunction));
  LogicalVariable v = context.newVar();
  vars.add(v);
  if (varRefs != null) {
    VariableReferenceExpression vRef = new VariableReferenceExpression(v);
    vRef.setSourceLocation(sourceLoc);
    varRefs.add(new MutableObject<ILogicalExpression>(vRef));
  }
}
origin: apache/asterixdb

  for (Mutable<ILogicalExpression> argumentRef : func.getArguments()) {
    if (containsNotMissingFiltering(argumentRef.getValue())) {
      return true;
  return false;
ILogicalExpression arg = func.getArguments().get(0).getValue();
if (arg.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) {
  return false;
origin: apache/asterixdb

@Override
public ILogicalExpression visitScalarFunctionCallExpression(ScalarFunctionCallExpression expr, Void arg)
    throws AlgebricksException {
  ScalarFunctionCallExpression exprCopy = new ScalarFunctionCallExpression(expr.getFunctionInfo(),
      deepCopyExpressionReferenceList(expr.getArguments()));
  deepCopyAnnotations(expr, exprCopy);
  deepCopyOpaqueParameters(expr, exprCopy);
  copySourceLocation(expr, exprCopy);
  return exprCopy;
}
origin: apache/asterixdb

  /**
   * Whether the expression contains a missing filtering
   *
   * @param expr
   * @return true if the expression contains a missing filtering function call; false otherwise.
   */
  private boolean containsMissingFiltering(ILogicalExpression expr) {
    if (expr.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) {
      return false;
    }
    ScalarFunctionCallExpression func = (ScalarFunctionCallExpression) expr;
    if (func.getFunctionIdentifier() == AlgebricksBuiltinFunctions.AND) {
      for (Mutable<ILogicalExpression> argumentRef : func.getArguments()) {
        if (containsMissingFiltering(argumentRef.getValue())) {
          return true;
        }
      }
      return false;
    }
    if (func.getFunctionIdentifier() != AlgebricksBuiltinFunctions.IS_MISSING) {
      return false;
    }
    return true;
  }
}
origin: apache/asterixdb

private ILogicalExpression translateConstantValue(IAObject value, SourceLocation sourceLoc)
    throws CompilationException {
  ConstantExpression constExpr = new ConstantExpression(new AsterixConstantValue(value));
  constExpr.setSourceLocation(sourceLoc);
  IAType valueType = value.getType();
  if (valueType.getTypeTag().isDerivedType()) {
    ScalarFunctionCallExpression castExpr =
        new ScalarFunctionCallExpression(FunctionUtil.getFunctionInfo(BuiltinFunctions.CAST_TYPE));
    castExpr.setSourceLocation(sourceLoc);
    castExpr.getArguments().add(new MutableObject<>(constExpr));
    TypeCastUtils.setRequiredAndInputTypes(castExpr, BuiltinType.ANY, valueType);
    return castExpr;
  } else {
    return constExpr;
  }
}
origin: apache/asterixdb

notNullFunc.getArguments().add(new MutableObject<ILogicalExpression>(arg));
origin: apache/asterixdb

ARecordType rt = (ARecordType) _emptyTypeEnv.getType(expr.getArguments().get(0).getValue());
String str = ConstantExpressionUtil.getStringConstant(expr.getArguments().get(1).getValue());
int k = rt.getFieldIndex(str);
if (k >= 0) {
origin: org.apache.vxquery/apache-vxquery-core

fcExpr.getArguments());
origin: apache/asterixdb

    FunctionUtil.getFunctionInfo(BuiltinFunctions.CAST_TYPE_LAX));
castFunc.setSourceLocation(sourceLoc);
castFunc.getArguments().add(new MutableObject<>(probeExpr));
TypeCastUtils.setRequiredAndInputTypes(castFunc, indexedFieldType, probeType);
boolean realTypeConvertedToIntegerType =
org.apache.hyracks.algebricks.core.algebra.expressionsScalarFunctionCallExpressiongetArguments

Popular methods of ScalarFunctionCallExpression

  • <init>
  • setSourceLocation
  • getAnnotations
  • getFunctionIdentifier
  • getFunctionInfo
  • cloneAnnotations
  • cloneArguments
  • equals
  • getOpaqueParameters
  • getSourceLocation
  • getUsedVariables
  • isFunctional
  • getUsedVariables,
  • isFunctional,
  • setOpaqueParameters,
  • substituteVar,
  • toString

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getContentResolver (Context)
  • runOnUiThread (Activity)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • DecimalFormat (java.text)
    A concrete subclass of NumberFormat that formats decimal numbers. It has a variety of features desig
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • From CI to AI: The AI layer in your organization
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now